LilyWhite Framework
春が来た。
基于 Litestar 和 Uvicorn 的 Python Web 框架。 想要 Spring 的分层和依赖注入,又不想在 Python 里写一堆 Builder,可以试试。
@controller、@service、@repository 和 @component 用来声明组件。构造器写清依赖,容器负责创建和清理。存储实现可以通过配置切换,启动时也不用再手动 import 一堆模块。
名字和 春が来た。 都来自东方 Project 的报春妖精 Lily White。框架不生成代理,也不靠 AOP 隐藏调用过程。函数在哪里调用、对象在哪里创建,都能顺着代码找到。
快速开始
需要 Python 3.14+ 和 uv:
uv add lilywhite
# my_app/application.py
from lilywhite import LilywhiteMain
@LilywhiteMain
class MyApplication:
application_name = "My LilyWhite App"
application_version = "0.1.0"
# my_app/__main__.py
from lilywhite import run
from .application import MyApplication
if __name__ == "__main__":
run(MyApplication)
# config.yaml
version: 1
uv run python -m my_app
打开 http://127.0.0.1:8000/healthz,就能看到健康检查结果。
仓库里的 example/ 是能直接运行的问候应用:
uv run python -m example
文档
Metadata
Release files for lilywhite 3.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lilywhite-3.2.1.tar.gz | 65.2 kB | With provenance | Details for lilywhite-3.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lilywhite-3.2.1-py3-none-any.whl | Python 3 | none | any | Details for lilywhite-3.2.1-py3-none-any.whl |
Total release size: 155.3 kB
Release files / lilywhite-3.2.1.tar.gz
| Download URL | lilywhite-3.2.1.tar.gz |
|---|---|
| Size | 65.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f9d7e7e4fcb2fbe477b71ee9e822f2bdfd90fd8427c6ae7882b92b713cbc700
|
|
BLAKE2b-256 checksum How to use checksums |
0b020985d8fdc9910d1174b0017ec7c63b00d89a201e86fc80eb4f10db613fdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / lilywhite-3.2.1-py3-none-any.whl
| Download URL | lilywhite-3.2.1-py3-none-any.whl |
|---|---|
| Size | 90.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d7f9ec8cddf301b4072425a8e414293e726587e304dc4ea7e6f4c34c860b107
|
|
BLAKE2b-256 checksum How to use checksums |
5cd803ed332afbcd9aa03a5b52086ec089386f6883a46f5773015aed5bbdb75b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for lilywhite 3.2.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lilywhite-3.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA 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.