Skip to main content

Fss aims to be one of top scaffold in PyWeb.

Project description

FastAPI Sqlmodel Starter (Fss)

logo

GitHub License PyPI - Python Version CI Codecov Read the Docs

简体中文 | English

PyWeb领域最好用的脚手架之一。

特性

  • 开箱即用, 内置常见数据库、缓存([默认]Sqlite, PostgreSQL, MySQL, [默认]文件缓存, Redis)
  • 自带单表的几乎所有操作
  • 数据库迁移, 静态代码扫描, 接口文档等一众特性

快速开始

  1. 首先确保python的版本是3.9及以上的
  2. 克隆代码
git clone https://github.com/tyvekzhang/fastapi-sqlmodel-starter
cd fastapi-sqlmodel-starter/src
  1. [可选]创建虚拟环境, 本篇以venv为例, 类似的工具还有conda, virtualenv等
python3 -m venv .env_fss
  1. [可选]激活虚拟环境
    • Windows: .env_fss\Scripts\activate
    • macOS 或 Linux: source .env_fss/bin/activate
  2. 安装 Poetry并下载依赖
pip install poetry --trusted-host=mirrors.tuna.tsinghua.edu.cn --index-url=https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
poetry install
  1. 数据库迁移
alembic upgrade head
  1. 启动
    • Windows: python3 fss\apiserver.py
    • macOS 或 Linux: python3 fss/apiserver.py
  2. 访问: http://127.0.0.1:9010/docs
  3. 首先通过注册接口新建用户, 接着进行认证, 一切Ok.

文档

贡献

欢迎为 FastapiSqlmodelStarter 做出贡献!你可以通过以下方式参与:

  • 提交 Bug 或功能需求到 Issue 追踪器
  • 提交代码改进的 Pull Request
  • 编写和改进文档
  • 分享你使用 FastapiSqlmodelStarter 的经验和想法

许可证

FastapiSqlmodelStarter 采用 MIT 许可证开源。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_sqlmodel_starter-1.0.0b1.tar.gz (184.2 kB view hashes)

Uploaded Source

Built Distribution

fastapi_sqlmodel_starter-1.0.0b1-py3-none-any.whl (200.0 kB view hashes)

Uploaded Python 3

Supported by

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