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.2.tar.gz (4.8 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.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file lazy_core-0.1.2.tar.gz.

File metadata

  • Download URL: lazy_core-0.1.2.tar.gz
  • Upload date:
  • Size: 4.8 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.2.tar.gz
Algorithm Hash digest
SHA256 101d328ce490c9009d71227bbaa5c3c36c4f9aa0ffa439940f0bf0a285058e9b
MD5 1497558f4b2ac62906a8a17e1c8c9112
BLAKE2b-256 230f291aa22901c0566da588fc438f04c00f7b1d4463b71845dd344f3dbe1bac

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazy_core-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: lazy_core-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dc4971ef84dd35201157d97e04f90bb693886bfb3e2abe290fb6e9787f1a6276
MD5 c5890cfa65289598f781986a005b8f5d
BLAKE2b-256 92aee2ccd586c9e94706e232eb958c9f77ca7e50fa082f6407959694fc0023c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazy_core-0.1.2-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