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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file collect_db_models-0.0.4.tar.gz.

File metadata

  • Download URL: collect_db_models-0.0.4.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/21.6.0

File hashes

Hashes for collect_db_models-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4929b9c229cb8b976a98cf835ab3230514c4dfc791f3fd51e9cc5696fece68a1
MD5 b3660d03980e4df27df48c73a3b68a80
BLAKE2b-256 876345fb03a34ed336f0ab678a364582c2adf9892b92d7ea0a7cbc29f4414756

See more details on using hashes here.

File details

Details for the file collect_db_models-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for collect_db_models-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6de59aedeaf16ffd85b7ac25b244358552d1151a1984482f9bbbfe63f23dfbb2
MD5 a7e652a6ddc366ff073b4dff929fceca
BLAKE2b-256 0ade6f76e69946dd9cde7b3fb7720f31f2f14d0d371c52b51ebc0a77c54987a4

See more details on using hashes here.

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