Skip to main content

Lazy-Core is the core module of the Lazy framework family.

Project description

Lazy-Core

PyPI CI codecov License: MIT

中文文档 | 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lazy_core-0.1.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazy_core-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

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

Hashes for lazy_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ce9e2a5d37744d2a8692e0b65fc89219f2d393ef498e38481d1eaa427baaaac7
MD5 e1a556fb121304805098481ec5932985
BLAKE2b-256 5813f55a20e248313f1bb200bd6cb6459dfd9caa1426607d0f8effcc4b792ddc

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazy_core-0.1.1.tar.gz:

Publisher: ci.yml on wrl96/lazy-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for lazy_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95714f8632a978415048949fc97f176007792aba3ba1e1e02ce392b75502cabb
MD5 221637209d57f5276464b94a3aa70fb7
BLAKE2b-256 25a110bdc69cca381bc4d218a62acfb205cd7daa82099f8c61f5f9c0c6ee8759

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazy_core-0.1.1-py3-none-any.whl:

Publisher: ci.yml on wrl96/lazy-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page