LazyOps is a Python library designed to provide a collection of utility modules and object registry patterns for building robust applications. It is currently under active refactoring to migrate core functionality into two distinct namespaces:
lzl(Lazy Libraries/Utilities): Foundational utilities, async helpers, API clients, I/O operations, logging, and type definitions.lzo(Lazy Objects/Registry): Object registry patterns, state management, and configuration settings.
Key Technologies: Python 3.10+, Pydantic v2, AnyIO, Loguru, Typer.
The codebase is organized into a src layout:
src/lzl/: Contains the utility modules (e.g.,io,logging,pool,proxied,require).src/lzo/: Contains the object registry and pattern modules (e.g.,registry,types,utils).tests/: Comprehensive test suite usingpytest, mirrored to the source structure.
To install the package in editable mode with all dependencies:
pip install -e ".[dev,docs,file,kops,fastapi]"The project uses setuptools configured via pyproject.toml.
- CLI: The project exposes a CLI entry point
lzl(mapped tolzl.cmd:main).
The project relies heavily on pytest and a Makefile to manage test execution.
Common Test Commands:
make test: Run the entire test suite.make test-lzl: Run all documentation-focused submodule tests forlzl.- Specific modules:
make test-lzl-io,make test-lzl-logging,make test-lzl-pool, etc.
- Specific modules:
make test-lzo: Run alllzosuite tests.- Specific modules:
make test-lzo-registry,make test-lzo-types.
- Specific modules:
Documentation is built using MkDocs with the Material theme and Mintlify.
make mkdocs-serve: Serve documentation locally athttp://127.0.0.1:8000/.make mkdocs-build: Build static documentation.make docs-preview: Preview via Mintlify.
pyproject.toml: Defines project metadata, dependencies (including optional groups likekops,fastapi), and build system.Makefile: The central entry point for running tests and documentation tasks.src/lzl/&src/lzo/: Core source code directories.README.md: Project overview and basic usage examples.
- Namespaces: strictly adhere to
lzlfor utilities andlzofor registry/objects. - Async First: The library leans heavily on
anyioand async patterns. - Pydantic: Extensive use of Pydantic models and settings (
BaseSettings,BaseModel) for configuration and validation.