Skip to main content

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.2

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

Source distribution (sdist)

Source distribution for lilywhite 3.2.2
File Size Uploaded Provenance Actions
lilywhite-3.2.2.tar.gz 65.5 kB With provenance Details for lilywhite-3.2.2.tar.gz

Built distribution (wheel)

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

Total release size: 155.9 kB

Release files / lilywhite-3.2.2.tar.gz

Download URL lilywhite-3.2.2.tar.gz
Size 65.5 kB
Tags Source
SHA-256 checksum
How to use checksums
97d3224ccb76d85f49ec66503584c5aa48aa7080cf488c006f7faa9015722c22
BLAKE2b-256 checksum
How to use checksums
e49f8ce05c0200ac88f85390ac4b76345819dab7357d17e226e8e3bae22a89e7
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 29, 2026.

Transparency log

Release files / lilywhite-3.2.2-py3-none-any.whl

Download URL lilywhite-3.2.2-py3-none-any.whl
Size 90.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d5486197e8ccf138e7c8de9a8f1a5fec599c84d4dc75842dbd85485b3f779eb
BLAKE2b-256 checksum
How to use checksums
d39300d20bd53616627c1217be1d7876d844cb7f098fea098247a2e102b68c23
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 29, 2026.

Transparency log

Security for lilywhite 3.2.2

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.

Select from 2 files

Attestation for lilywhite-3.2.2.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 29, 2026.

Transparency log

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.

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