Metadata-Version: 2.1
Name: fastapi-sqlmodel-starter
Version: 1.0.1
Summary: Fss aims to be one of top scaffold in PyWeb.
Home-page: https://github.com/tyvekzhang/fastapi-sqlmodel-starter
License: MIT
Keywords: fastapi,sqlmodel,tools,web,scaffold
Author: tyvekZhang
Author-email: tyvekzhang@gmail.com
Maintainer: tyvekZhang
Maintainer-email: tyvekzhang@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Dist: aiomysql (>=0.2.0,<0.3.0)
Requires-Dist: aiosqlite (>=0.20.0,<0.21.0)
Requires-Dist: alembic (>=1.13.1,<2.0.0)
Requires-Dist: asyncpg (>=0.29.0,<0.30.0)
Requires-Dist: bcrypt (==4.0.1)
Requires-Dist: diskcache (>=5.6.3,<6.0.0)
Requires-Dist: eval-type-backport (>=0.1.3,<0.2.0)
Requires-Dist: fastapi (>=0.110.0,<0.111.0)
Requires-Dist: fastapi-async-sqlalchemy (>=0.6.1,<0.7.0)
Requires-Dist: fastapi-offline (>=1.7.1,<2.0.0)
Requires-Dist: fastapi-pagination (>=0.12.21,<0.13.0)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: openpyxl (>=3.1.2,<4.0.0)
Requires-Dist: pandas (>=2.2.2,<3.0.0)
Requires-Dist: passlib (>=1.7.4,<2.0.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: python-jose[cryptography] (>=3.3.0,<4.0.0)
Requires-Dist: python-multipart (>=0.0.9,<0.0.10)
Requires-Dist: redis[hiredis] (>=5.0.3,<6.0.0)
Requires-Dist: slowapi (>=0.1.9,<0.2.0)
Requires-Dist: sqlalchemy-utils (>=0.41.2,<0.42.0)
Requires-Dist: sqlmodel (>=0.0.16,<0.0.17)
Requires-Dist: uvicorn (>=0.29.0,<0.30.0)
Requires-Dist: xlsxwriter (>=3.2.0,<4.0.0)
Project-URL: Documentation, https://github.com/tyvekzhang/fastapi-sqlmodel-starter/wiki
Project-URL: Repository, https://github.com/tyvekzhang/fastapi-sqlmodel-starter
Description-Content-Type: text/markdown

<div  align="center" style="margin-top: 3%">
   <h1>
     FastAPI SQLModel Starter (Fss)
   </h1>
   <p>
     <img src="https://raw.githubusercontent.com/tyvekzhang/fastapi-sqlmodel-starter/main/docs/source/_static/img/fss.svg" alt="logo" style="vertical-align:middle; margin: 0.5%"/>
   </p>
   <p>
     <img alt="GitHub License" src="https://img.shields.io/github/license/tyvekzhang/fastapi-sqlmodel-starter">
     <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/fastapi-sqlmodel-starter">
     <img alt="CI" src="https://github.com/tyvekzhang/fastapi-sqlmodel-starter/actions/workflows/ci.yaml/badge.svg">
     <img alt="Codecov" src="https://img.shields.io/codecov/c/github/tyvekzhang/fastapi-sqlmodel-starter">
     <img alt="Read the Docs" src="https://img.shields.io/readthedocs/fastapi-sqlmodel-starter">
   </p>
   <h4>
      <p>
        <b>简体中文</b> |
        <a href="https://github.com/tyvekzhang/fastapi-sqlmodel-starter/blob/main/docs/README_en.md">English</a>
     </p>
   </h4>
   <h3>
    PyWeb领域最好用的脚手架之一。
   </h3>
</div>


## 特性

- ⚡ 开箱即用, 实现中间件的零依赖
   - 默认使用Sqlite, 也可自由切换PostgreSQL、MySQL数据库
   - 可选文件或Redis缓存
- 🚢 开启Python代码操作数据库的新体验
- 🚀 简化ORM操作, 内置单表常见操作
- 🎨 丰富的插件机制
   - Jwt安全认证
   - 访问限流
   - Ip黑名单
- 🐋 完备的容器化解决方案
  - Docker
  - Docker-compose
  - Kubernetes
- ✅ 基于GitHub Actions的CI (持续集成) 和 CD (持续交付)

## 文档
- 交互式API文档
  <img alt="API doc"  src="https://raw.githubusercontent.com/tyvekzhang/fastapi-sqlmodel-starter/main/docs/img/api_doc.png">
- 在线文档: [Read the docs](https://fastapi-sqlmodel-starter.readthedocs.io/en/latest/)

## 快速开始
1. 首先确保python版本为3.9及以上
2. 克隆代码
```shell
git clone https://github.com/tyvekzhang/fastapi-sqlmodel-starter
cd fastapi-sqlmodel-starter/fss
```
3. [可选]创建虚拟环境, 本篇以venv为例, 类似的工具还有conda, virtualenv等
```shell
python3 -m venv .env_fss
```
4. [可选]激活虚拟环境
    - Windows: .env_fss\Scripts\activate
    - macOS 或 Linux: source .env_fss/bin/activate
5. 安装 Poetry并下载依赖
```shell
pip install poetry --trusted-host=mirrors.tuna.tsinghua.edu.cn --index-url=https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
poetry install
```
6. 数据库迁移
```shell
alembic upgrade head
```
7. 启动
   - Windows: python3 apiserver.py
   - macOS 或 Linux: python3 apiserver.py
8. 访问: http://127.0.0.1:9010/docs
> 成功访问后需要创建用户并认证

## 贡献

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

- 提交 Bug 或功能需求到 [Issue清单](https://github.com/tyvekzhang/fastapi-sqlmodel-starter/issues)
- 提交代码改进的 Pull Request
- 编写和改进文档
- 分享你使用 FastapiSqlmodelStarter 的经验和想法

## 许可证

FastapiSqlmodelStarter 采用 [MIT 许可证](https://opensource.org/licenses/MIT)开源。

