Skip to main content

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

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.6.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

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

Hashes for collect_db_models-0.0.6.tar.gz
Algorithm Hash digest
SHA256 2a74487cf2bb139d8a071fbff5889aab93c1d174e60877600554bca7209768db
MD5 5fc8356c54d2d4268e5a90fb4fcaf3be
BLAKE2b-256 3bfc1833bb3929d07c1affbd8357080d374a9da48ab6a8856e65765afe94b117

See more details on using hashes here.

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

Hashes for collect_db_models-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3641f28c062a22ec45517739d98eaeb37db70a6c3e278ceca14ef60d33c87b83
MD5 6a2ef042653c4c70e17fe973ff7efa61
BLAKE2b-256 cca4c98ecb433019021f6b7afbf51bb4a025ccfc24057b17ed1ddabe232a4208

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page