It translates django models into sqlalchemy orm/expression objects.


Keywords
django, sqlalchemy, alchemy, model, mapping, decralation, table, schema, expression, orm, convert, codegen, code-generator, codegenerator, geoalchemy, geodjango, python
License
MIT
Install
pip install d2a==3.0.1

Documentation

https://github.com/walkframe/d2a/workflows/build/badge.svg?branch=master

Requirements

  • Python: 3.5 or later.
    • Tested with 3.6, 3.9
  • Django: 2.x, 3.x
    • Tested with 2.2.9, 3.0.1, 3.1.1
  • SQLAlchemy: 1.1 or later.
    • Tested with 1.1.0, 1.4.1

2 STEPS TO USE

Installation

$ pip install d2a -U

Add d2a to settings.INSTALLED_APPS.

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # :
    # :
    'd2a',
]

Code generation

$ ./manage.py sqla_codegen

Link