Skip to main content

collect sqlalchemy models to one file(eg. __init__.py)

Project description

collect db models

collect sqlalchemy models to one file

安装

pip install collect-db-models

使用

flask collect-db-models > {package_name}/models/__init__.py

如果没有报错,就可以把文件更名为__init__.py

用下面的语句更简单,也会有一样的效果

flask collect-db-models -w

Flask项目需要符合下面的结构

your_project/
│
├──core/
│   └── __init__.py
├──models/
│   └── __init__.py

your_project/core/__init__.py

from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collect_db_models-0.0.4.tar.gz (1.9 kB view hashes)

Uploaded Source

Built Distribution

collect_db_models-0.0.4-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page