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

Metadata

Release files for collect-db-models 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collect-db-models 0.0.6
File Size Uploaded
collect_db_models-0.0.6.tar.gz 1.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for collect-db-models 0.0.6
File Interpreter ABI Platform
collect_db_models-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 4.5 kB

Release files / collect_db_models-0.0.6.tar.gz

Download URL collect_db_models-0.0.6.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2a74487cf2bb139d8a071fbff5889aab93c1d174e60877600554bca7209768db
BLAKE2b-256 checksum
How to use checksums
3bfc1833bb3929d07c1affbd8357080d374a9da48ab6a8856e65765afe94b117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-59-generic

Release files / collect_db_models-0.0.6-py3-none-any.whl

Download URL collect_db_models-0.0.6-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3641f28c062a22ec45517739d98eaeb37db70a6c3e278ceca14ef60d33c87b83
BLAKE2b-256 checksum
How to use checksums
cca4c98ecb433019021f6b7afbf51bb4a025ccfc24057b17ed1ddabe232a4208
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-59-generic

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page