Lazy-Core is the core module of the Lazy framework family.
Project description
Lazy-Core
中文文档 | English
Lazy Family: Lazy-Flask | Lazy-Django | Lazy-FastAPI
Lazy-Core is the core module of the Lazy framework family.
It provides modular registration, a unified request/response schema, middleware support, and consistent exception handling.
Table of Contents
Installation (as a dependency)
It’s recommended to declare lazy-core as a dependency in your upper-layer framework/library. End users usually don’t need to install it directly.
# pyproject.toml
[tool.poetry.dependencies]
lazy-core = "^0.1.0"
Or install with pip:
pip install lazy-core
Module Overview
LazyApp:The core application class responsible for module management.Module:A modular unit that manages middleware and event handlers.APIRequest:A unified API request schema.APIResponse:A unified API response schema.APIError:A unified API error payload.APIException:The base exception for API errors.Middleware:Base class for middleware, supporting pre- and post-processing of requests.LazyJSONEncoder:JSON encoder tailored for the Lazy framework.
Testing
This project ships with pytest and coverage reporting. Run all tests and generate an HTML report:
poetry run pytest --cov=lazy_core --cov-report=html
The coverage report will be available at htmlcov/index.html.
Code Style & Typing
- Ruff (lint & auto-fix):
poetry run ruff check . --fix - MyPy (type checking):
poetry run mypy src/ tests/ - pre-commit (run all hooks):
poetry run pre-commit run --all-files
Contributing
Issues and PRs are welcome! Please ensure:
- All lint/type/tests pass
- New features include corresponding tests
- The PR description is clear about the change
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lazy_core-0.1.1.tar.gz.
File metadata
- Download URL: lazy_core-0.1.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce9e2a5d37744d2a8692e0b65fc89219f2d393ef498e38481d1eaa427baaaac7
|
|
| MD5 |
e1a556fb121304805098481ec5932985
|
|
| BLAKE2b-256 |
5813f55a20e248313f1bb200bd6cb6459dfd9caa1426607d0f8effcc4b792ddc
|
Provenance
The following attestation bundles were made for lazy_core-0.1.1.tar.gz:
Publisher:
ci.yml on wrl96/lazy-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lazy_core-0.1.1.tar.gz -
Subject digest:
ce9e2a5d37744d2a8692e0b65fc89219f2d393ef498e38481d1eaa427baaaac7 - Sigstore transparency entry: 506592990
- Sigstore integration time:
-
Permalink:
wrl96/lazy-core@95b02440103dec2a2df2b95b69c287d724ed5b1a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/wrl96
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@95b02440103dec2a2df2b95b69c287d724ed5b1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file lazy_core-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lazy_core-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95714f8632a978415048949fc97f176007792aba3ba1e1e02ce392b75502cabb
|
|
| MD5 |
221637209d57f5276464b94a3aa70fb7
|
|
| BLAKE2b-256 |
25a110bdc69cca381bc4d218a62acfb205cd7daa82099f8c61f5f9c0c6ee8759
|
Provenance
The following attestation bundles were made for lazy_core-0.1.1-py3-none-any.whl:
Publisher:
ci.yml on wrl96/lazy-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lazy_core-0.1.1-py3-none-any.whl -
Subject digest:
95714f8632a978415048949fc97f176007792aba3ba1e1e02ce392b75502cabb - Sigstore transparency entry: 506593013
- Sigstore integration time:
-
Permalink:
wrl96/lazy-core@95b02440103dec2a2df2b95b69c287d724ed5b1a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/wrl96
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@95b02440103dec2a2df2b95b69c287d724ed5b1a -
Trigger Event:
push
-
Statement type: