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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file collect_db_models-0.0.6.tar.gz.
File metadata
- Download URL: collect_db_models-0.0.6.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-59-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a74487cf2bb139d8a071fbff5889aab93c1d174e60877600554bca7209768db
|
|
| MD5 |
5fc8356c54d2d4268e5a90fb4fcaf3be
|
|
| BLAKE2b-256 |
3bfc1833bb3929d07c1affbd8357080d374a9da48ab6a8856e65765afe94b117
|
File details
Details for the file collect_db_models-0.0.6-py3-none-any.whl.
File metadata
- Download URL: collect_db_models-0.0.6-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-59-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3641f28c062a22ec45517739d98eaeb37db70a6c3e278ceca14ef60d33c87b83
|
|
| MD5 |
6a2ef042653c4c70e17fe973ff7efa61
|
|
| BLAKE2b-256 |
cca4c98ecb433019021f6b7afbf51bb4a025ccfc24057b17ed1ddabe232a4208
|