Skip to main content

This is a fastapi scaff.

Project description

fastapi-scaff

What is this?

  • by: axiner
  • fastapi-scaff
  • This is a fastapi scaff.
    • new project
    • add api
    • about project:
      • auto init project (conf, db, log...)
      • auto register router
      • auto register middleware
      • ...
    • more documents: 请点击链接

Project structure

  • ABD: ABD模式
    • A api
    • B business
    • D dschema (data schema)
  • 调用过程: main.py(initializer) -> (middleware) - router - api - business - (dschema)
  • 结构如下: (命名经过多次修改敲定,简洁易懂,ABD目录贴合避免杂乱无章)
    └── fastapi-scaff
        ├── app                         (应用)
        │   ├── api                     ├── (api)
        │   │   └── v1                  │   └── (v1)
        │   ├── business                ├── (业务)
        │   ├── dschema                 ├── (数据结构)
        │   ├── initializer             ├── (初始化)
        │   │   ├── conf                │   ├── (配置)
        │   │   ├── db                  │   ├── (数据库)
        │   │   ├── log                 │   ├── (日志)
        │   │   └── ...                 │   └── (...)
        │   ├── middleware              ├── (中间件)
        │   ├── router                  ├── (路由)
        │   ├── utils                   ├── (utils)
        │   └── main.py                 └── (main.py)
        ├── config                      (配置目录)
        ├── deploy                      (部署目录)
        ├── docs                        (文档目录)
        ├── log                         (日志目录)
        ├── .gitignore
        ├── LICENSE
        ├── README.md
        ├── requirements.txt
        └── runserver.py
    

Installation

This package can be installed using pip (Python>=3.11):

pip install fastapi-scaff

Scaff usage

  • 1)help document
    • fastapi-scaff -h
  • 2)new project
    • fastapi-scaff new <myproj>
  • 3)add api
    • cd to project root dir
    • fastapi-scaff add <myapi>

Project run

  • 1)cd to project root dir
  • 2)modify the configuration, such as for the database
  • 3)pip install -r requirements.txt
  • 4)python runserver.py

License

This project is released under the MIT License (MIT). See LICENSE

Project details


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

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

fastapi_scaff-0.0.5-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_scaff-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: fastapi_scaff-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for fastapi_scaff-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a9acfa2db051f3557f2180910c73ef4f98e4868904c873c2182fc18dcf15b51c
MD5 265f0790fcab5a0b74cf6acb3c304e80
BLAKE2b-256 49eb4fa9ab07b12756ae262e3f8c0f944e533842e6d25401e7ce86361a244a06

See more details on using hashes here.

Supported by

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