Catalogus
A Python library providing classes for name-to-object registry-like support.
Overview
Catalogus provides a simple and extensible registry system that allows you to:
- Register objects by name
- Retrieve objects by name
- Support lazy loading of objects
- Maintain type safety with generic support
This library was extracted from the Breezy version control system to provide a reusable registry implementation.
Installation
pip install catalogus
Quick Start
from catalogus import Registry
# Create a registry
my_registry = Registry()
# Register objects directly
my_registry.register("item1", some_object)
# Register with lazy loading
my_registry.register_lazy("item2", "my.module", "MyClass")
# Retrieve objects
obj = my_registry.get("item1")
Features
- Type-safe: Full generic type support with TypeVar
- Lazy loading: Objects can be loaded on-demand from modules
- Flexible registration: Support for direct objects and lazy imports
- Iterator support: Iterate over registered items
- Python 3.9+: Modern Python support
Development
Install development dependencies:
pip install -e .[dev]
Run tests:
pytest
Format code:
ruff format
Check code style:
ruff check
mypy catalogus
License
This project is licensed under the GNU General Public License v2 or later (GPLv2+).
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Release files for catalogus 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| catalogus-0.1.2.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| catalogus-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.2 kB
Release files / catalogus-0.1.2.tar.gz
| Download URL | catalogus-0.1.2.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0737aced12078b67e9ef5c0cd5fda0a8c14fd6007a83c1e4c1930a2245e2bd9a
|
|
BLAKE2b-256 checksum How to use checksums |
e970d88303967b16fd7f937a281fe9899ea5c34602296d8a6a07bb188acaf218
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 28, 2026.
Transparency logRelease files / catalogus-0.1.2-py3-none-any.whl
| Download URL | catalogus-0.1.2-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1c4b4bc290bf1114d73f82a9fd7ab7f836f6ee84e540053a7d355735a3a0470
|
|
BLAKE2b-256 checksum How to use checksums |
4c406aa2f7b04ca5fb22ba2075142241a72c739c98aaadf1f313148066edb257
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 28, 2026.
Transparency log