Skip to main content

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, log...)
      • auto register router
      • auto register middleware
      • ...
    • more documents: 请点击链接

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                  │   ├── (数据库)
        │   │   ├── log                 │   ├── (日志)
        │   │   └── ...                 │   └── (...)
        │   ├── 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 (Python>=3.11):

pip install fastapi-scaf

Scaf Usage

  • 1)help document
    • fastapi-scaf -h
  • 2)new project
    • fastapi-scaf new <myproj>
  • 3)add api
    • cd to project root dir
    • fastapi-scaf 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_scaf-1.5.4-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_scaf-1.5.4-py3-none-any.whl.

File metadata

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

File hashes

Hashes for fastapi_scaf-1.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c49c4dc8e83c09e1b0e88fe11a80d7d7f6a825582a414cbf265d87f5f6d31c3e
MD5 721729ce514a084de18702c1932201d3
BLAKE2b-256 30268111fb5ffd86df4220cd29a97f4ab2ccfaa19633825b339a9cd365d2a557

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