Skip to main content

fastkeel ⚡

FastAPI backend scaffold — user auth, social, subscriptions, jobs & LLM. pip install fastkeel,一行命令生成完整后端骨架。

Status: v0.1.0 — 生产就绪,MIT 开源。


快速开始

# 安装
pip install fastkeel

# 生成项目
fastkeel new my-app --with-user --with-social --with-payment --with-jobs
cd my-app

# 安装依赖并启动
pip install uvicorn
python main.py

生成的项目直接可用:注册、登录、搭子关系、支付订阅、定时任务 — 一个 main.py 全搞定。


CLI 用法

fastkeel new <项目名> [--with-user] [--with-social] [--with-payment] [--with-jobs] [--path <路径>]
参数 默认 说明
--with-user True 设备注册 + JWT 认证
--with-social False 搭子关系 + 群组管理
--with-payment False 订阅管理 + 收据验证
--with-jobs False APScheduler 定时任务
--path . 项目生成路径

不选的模块不注册路由、不创建表、不引入依赖。


模块

模块 提供
core FastAPI app factory、Config (TOML + env)、SQLite (WAL)、JWT、CORS + 统一错误处理
user 设备注册、登录、JWT 认证、资料更新
social 搭子邀请码、搭子绑定/解除、群组创建/加入/解散
payment 套餐管理、收据验证(渠道无关)、订阅生命周期、支付流水
jobs APScheduler 定时任务、心跳检查、SQLite 持久化
contrib/llm LLM API 客户端(自动重试、限流、流式、结构化输出)

架构

你的项目
├── main.py          # import fastkeel → compose app
├── config.toml      # TOML 配置(环境变量覆盖)
├── project/         # 你的业务逻辑
│   ├── routes/
│   ├── logic/
│   └── prompts/
└── tests/

        │ pip install fastkeel
        v
fastkeel (this repo)
├── core/            # 100% 通用,不修改
├── modules/         # 90% 通用,include_*() 选装
├── contrib/         # 扩展集成,按需 import
└── cli/             # fastkeel new 命令

分层规则:

  • core/ — 项目永不修改。需要改意味着抽象边界要调整
  • modules/ — 通过 config 配置,不修改源码
  • project/ — 写业务逻辑的地方

开发

# Setup
git clone https://github.com/helioswei/fastkeel
cd fastkeel
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

# Commands
make lint           # ruff check .
make test           # pytest
make build          # python -m build
make publish        # build + twine upload

# Test single file
pytest tests/test_modules/test_user.py -v

测试 (122 tests, 1.5s)

测试集 测试数
test_core/ (config, db, auth, middleware, app) 47
test_modules/test_user.py 13
test_modules/test_social.py 21
test_modules/test_payment.py 13
test_modules/test_jobs.py 5
test_contrib/test_llm.py 8
test_cli/test_new.py 9
test_integration.py 6
合计 122

Roadmap

  • PyPI release — python -m build && twine upload dist/*
  • user_extra_fields dynamic columns — ALTER TABLE ADD COLUMN from config
  • End-to-end generated project test — fastkeel new → pip install → serve → curl
  • Webhook signature verification — validate payment_webhook_secret

MIT © 2026 Helioswei

Metadata

Release files for fastkeel 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastkeel 0.1.1
File Size Uploaded Provenance Actions
fastkeel-0.1.1.tar.gz 27.5 kB Without provenance Details for fastkeel-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastkeel 0.1.1
File Interpreter ABI Platform Actions
fastkeel-0.1.1-py3-none-any.whl Python 3 none any Details for fastkeel-0.1.1-py3-none-any.whl

Total release size: 52.1 kB

Release files / fastkeel-0.1.1.tar.gz

Download URL fastkeel-0.1.1.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e879d84d537ca99b8a21ce87d09e2b5729689189285a0e6461e5eafe15199989
BLAKE2b-256 checksum
How to use checksums
e4a297f19cf0fa1e0d781ccdbaed71eb58a6427a7616e079ed2fef36e5bd2ab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.14.5

Release files / fastkeel-0.1.1-py3-none-any.whl

Download URL fastkeel-0.1.1-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32ee8ed19768545814fb1616c395311b01eee80d04cd9d9fe4d8d3b2bad17d98
BLAKE2b-256 checksum
How to use checksums
05de7f9523a056854d65e66ec6d835d35a62385300867957082c8e87d006d406
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.14.5

Security for fastkeel 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page