Generate Data Model (Django/Flask/SQLAlchemy)ΒΆ

☯️ gen_data_model is tool generator of form model for

  • Django FWK
  • Flask FWK
  • SQLAlchemy

Developed in 🐍 python code.

The README is used to introduce the modules and provide instructions on how to install the modules, any machine dependencies it may have and any other information that should be provided before the modules are installed.

python package github issues documentation status github contributors

InstallationΒΆ

install python2 package install python3 package

Navigate to release page download and extract release archive πŸ“¦.

To install gen_data_model πŸ“¦ type the following

tar xvzf gen_data_model-x.y.z.tar.gz
cd gen_data_model-x.y.z
#python2
pip install -r requirements.txt
python setup.py install_lib
python setup.py install_egg_info
python setup.py install_data
#python3
pip3 install -r requirements.txt
python3 setup.py install_lib
python3 setup.py install_egg_info
python3 setup.py install_data

You can use Docker to create image/container, or You can use pip to install πŸ“¦

#python2
pip install gen_data_model
#python3
pip3 install gen_data_model

github docker checker

Generation processΒΆ

Generation flow

https://raw.githubusercontent.com/vroncevic/gen_data_model/dev/docs/gen_data_model_flow.png

Tool structureΒΆ

gen_data_model is based on OOP

https://raw.githubusercontent.com/vroncevic/gen_data_model/dev/docs/gen_data_model.png

🧰 Generator structure

gen_data_model/
β”œβ”€β”€ conf/
|   β”œβ”€β”€ gen_data_model.logo
β”‚Β Β  β”œβ”€β”€ data_model_types.yaml
β”‚Β Β  β”œβ”€β”€ gen_data_model.cfg
β”‚Β Β  β”œβ”€β”€ gen_data_model_util.cfg
β”‚Β Β  └── template/
β”‚Β Β      β”œβ”€β”€ django_base_model.template
β”‚Β Β      β”œβ”€β”€ django.template
β”‚Β Β      β”œβ”€β”€ flask_base_model.template
β”‚Β Β      β”œβ”€β”€ flask.template
β”‚Β Β      β”œβ”€β”€ sqlalchemy_base_model.template
β”‚Β Β      └── sqlalchemy.template
β”œβ”€β”€ __init__.py
β”œβ”€β”€ log/
β”‚Β Β  └── gen_data_model.log
β”œβ”€β”€ pro/
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ model_selector.py
β”‚Β Β  β”œβ”€β”€ read_template.py
β”‚Β Β  └── write_template.py
└── run/
    └── gen_data_model_run.py

Indices and tablesΒΆ