Skip to main content

bm-fastapi-scaffold

一行命令起一个对齐团队 PATTERNS.md 的 FastAPI monorepo + 首个子服务。

安装

pip install bm-fastapi-scaffold

用法

bm-fastapi-scaffold init my-business-project
# 默认 --service app --port 30000 --target .

bm-fastapi-scaffold init my-business-project --service core --port 30010
bm-fastapi-scaffold init my-business-project --target ~/repos

生成结构:

my-business-project/
├── .env.example
├── .gitignore
├── .gitlab-ci.yml
├── .pre-commit-config.yaml
├── README.md
├── compose.local.yaml
├── install_dev.sh
├── mypy.ini
├── requirements_dev.txt
└── agents/
    └── app/
        ├── app/
        │   ├── __init__.py
        │   ├── _info.py
        │   ├── _log.py
        │   ├── app.py
        │   ├── interface_models.py
        │   ├── server.py
        │   └── settings.py
        ├── tests/
        ├── Dockerfile
        ├── .dockerignore
        ├── start_server.sh
        ├── build.sh
        ├── pyproject.toml
        ├── requirements.txt
        └── requirements_wheels.txt

起服务

cd my-business-project
bash install_dev.sh
cd agents/app
python -m app.server
curl http://localhost:30000/

规范

模板对齐 bm-ai 团队 PATTERNS.md:

  • settings.py 用 {env: value} 字典分环境(不写 if/elif)
  • _info.py 用 tomllib 读 pyproject 版本(不用 importlib.metadata)
  • pyproject.toml 含 requires-python = ">=3.12,<3.13" 上限
  • .dockerignore 含 *.egg-info 避免污染 build
  • Dockerfile 钉死 base 镜像 tag
  • 日志走 util_common.logger.setup_loggers 异步 JSON logger

License

MIT

Metadata

Release files for bm-fastapi-scaffold 0.0.1

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

Source distribution (sdist)

Source distribution for bm-fastapi-scaffold 0.0.1
File Size Uploaded Provenance Actions
bm_fastapi_scaffold-0.0.1.tar.gz 12.7 kB Without provenance Details for bm_fastapi_scaffold-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bm-fastapi-scaffold 0.0.1
File Interpreter ABI Platform Actions
bm_fastapi_scaffold-0.0.1-py3-none-any.whl Python 3 none any Details for bm_fastapi_scaffold-0.0.1-py3-none-any.whl

Total release size: 30.5 kB

Release files / bm_fastapi_scaffold-0.0.1.tar.gz

Download URL bm_fastapi_scaffold-0.0.1.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d31622d8e3cee87f22d79f81d7ab5b2045a9e3721bf32069565dbcf6bb453d62
BLAKE2b-256 checksum
How to use checksums
b9c1bf803f8b5bd4c5bf8c9152113298cc91727c71d24531cee07d5914e95495
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / bm_fastapi_scaffold-0.0.1-py3-none-any.whl

Download URL bm_fastapi_scaffold-0.0.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
113e654f794ab4cb96b7311400985083b3fa5c787a59fceb08e19c29a07938c1
BLAKE2b-256 checksum
How to use checksums
fd03bf5c18f310aa11c69c411e59ea5ed55371f63b607ef1e277e5af50f85fff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Security for bm-fastapi-scaffold 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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