This is a fastapi scaf.
Project description
fastapi-scaf
What is this?
- by: axiner
- fastapi-scaf
- This is a fastapi scaf.
- new project
- add api
- about project:
- auto init project (conf, db, logger...)
- auto register router
- auto register middleware
- more docs: 请点击链接
Project Structure
- ABD: ABD模式
- A api
- B business
- D datatype
- 调用过程: main.py(initializer) - router(middleware) - api - business - (datatype)
- 结构如下: (命名经过多次修改敲定,简洁易懂,ABD目录贴合避免杂乱无章)
└── fastapi-scaf ├── app (应用) │ ├── api ├── (api) │ │ └── v1 │ └── (v1) │ ├── business ├── (业务) │ ├── datatype ├── (数据类型) │ ├── initializer ├── (初始化) │ │ ├── conf │ ├── (配置) │ │ ├── db │ ├── (数据库) │ │ ├── logger │ ├── (日志) │ │ └── ... │ └── (...) │ ├── middleware ├── (中间件) │ ├── router ├── (路由) │ ├── utils ├── (utils) │ └── main.py └── (main.py) ├── config (配置目录) ├── deploy (部署目录) ├── docs (文档目录) ├── log (日志目录) ├── .gitignore ├── LICENSE ├── README.md └── requirements.txt
Installation
This package can be installed using pip (>=Python3.11):
pip install fastapi-scaf
Scaf Usage
- 1)new project
fastapi-scaf new <project_name>
- 2)add api
cd to project root dirfastapi-scaf add <api_name>
Project Run
- 1)cd to project root dir
- 2)execute command:
pip install -r requirements.txtuvicorn app.main:app --host=0.0.0.0 --port=8000 --log-level=info --log-config=./config/uvicorn_logging.json --workers=5- about uvicorn: www.uvicorn.org
LICENSE
This project is released under the MIT License (MIT). See LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 fastapi_scaf-1.2.3-py3-none-any.whl.
File metadata
- Download URL: fastapi_scaf-1.2.3-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f527721ffb81ceb5c0c8e8fd9454915a5f5ae376aa535e1f4c31f803887a72b4
|
|
| MD5 |
0375bfeaff8ccfe80656d710f587cc7a
|
|
| BLAKE2b-256 |
0c4beee96aa73c4221e7d9a963c65527015985f49c2494a6333b316212e470d0
|