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缓存
  • 🚢 开启Python代码操作数据库的新体验
  • 🚀 简化ORM操作, 内置单表常见操作
  • 🎨 丰富的插件机制
    • Jwt安全认证
    • 访问限流
    • Ip黑名单
  • 🐋 完备的容器化解决方案
    • Docker
    • Docker-compose
    • Kubernetes
  • ✅ 基于GitHub Actions的CI (持续集成) 和 CD (持续交付)

文档

快速开始

  1. 首先确保python版本为3.9及以上
  2. 克隆代码
git clone https://github.com/tyvekzhang/fastapi-sqlmodel-starter
cd fastapi-sqlmodel-starter/fss
  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 apiserver.py
    • macOS 或 Linux: python3 apiserver.py
  2. 访问: http://127.0.0.1:9010/docs

成功访问后需要创建用户并认证

贡献

欢迎为 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.1.tar.gz (90.2 kB view hashes)

Uploaded Source

Built Distribution

fastapi_sqlmodel_starter-1.0.1-py3-none-any.whl (49.7 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