• v0.3.1 2bb361e3a3

    v0.3.1 — Public repository API and subclassable adapters
    Code Quality Pipeline / code-quality (push) Successful in 30s
    Test Python Package / test (push) Successful in 52s
    Publish Python Package / build-and-publish (push) Successful in 22s
    Stable

    brian released this 2026-06-28 20:12:00 +02:00 | 141 commits to main since this release

    Summary

    This release introduces a clear public CRUD/repository API, making Redis and MinIO adapters intended base classes for domain-specific repositories in consuming projects.

    Highlights

    Public repository interfaces

    • Added JsonRepositoryInterface for JSON document storage (Redis)
    • Added ObjectRepositoryInterface for binary object storage (MinIO)
    • Both interfaces are exported from the top-level package alongside existing connection/context interfaces

    Adapter CRUD API

    • Promoted adapter methods from private (_get, _set, etc.) to public (get, set, put, delete, list_keys, list_objects)
    • RedisAdapter and MinioAdapter now implement the new repository interfaces
    • Context managers return Self, so subclasses keep their concrete type in with blocks (fixes mypy typing for domain repositories)

    Example domain repositories

    • UserJsonRepository — Redis JSON example with get_user / save_user / delete_user
    • ArtifactObjectRepository — MinIO example with get_artifact / store_artifact

    Packaging & development

    • Package is installable via hatchling (uv sync installs the project editable)
    • Expanded README with architecture overview, quick-start examples, env vars, and dev setup
    • Documented pre-commit install for local hook setup
    • CI Prettier check now runs via pre-commit (pinned, no npm install step)
    • Mypy python_version aligned to 3.12

    Documentation fixes

    • Removed references to an unimplemented Mongo adapter from the README

    Breaking changes

    If you were calling private adapter methods directly, update call sites:

    Before After
    _get get
    _set set
    _put put
    _delete delete
    _list_keys list_keys
    _list_objects list_objects

    Recommended pattern for application code: subclass an adapter and add domain methods rather than using adapters directly.

    Install

    uv add python-repositories[redis]
    uv add python-repositories[minio]
    
    Downloads