Project Structure & Organization
Abstract Backend ships as an installable library plus a fully-documented reference implementation. This page reflects the current repository layout so you can navigate production code, tests, and docs with confidence.
High-Level Layoutβ
abstract-backend/
βββ abe/ # Published Python package
β βββ backends/
β β βββ message_queue/ # Message queue protocols + helpers
β βββ logging/ # LoggingConfig + runtime utilities
β βββ types.py # Shared type aliases and Protocols
β βββ py.typed # PEP 561 marker
βββ docs/ # Docusaurus content + site assets
βββ examples/ # Runnable usage samples
βββ scripts/ # CI and operational tooling
βββ test/ # Pytest suites (unit, integration, contract, e2e)
βββ .github/ # GitHub Actions workflows & templates
βββ uv.lock # Locked dependency graph (uv)
βββ pyproject.toml # Project metadata + tool configuration
βββ ... # Config files (.pre-commit-config.yaml, mypy.ini, etc.)
abe/ packageβ
abe/backends/message_queue/features the production message-queue abstraction. It includes theMessageQueueBackendprotocol inabe/backends/message_queue/base/protocol.py, the runtime consumer inabe/backends/message_queue/consumer.py, the dynamic loader inabe/backends/message_queue/loader.py, and the development-onlyMemoryBackendunderabe/backends/message_queue/service/memory.py.abe/logging/exposes structured logging support throughabe/logging/settings.py(theLoggingConfigdataclass) andabe/logging/utils.py(setup helpers, logger controls, and path utilities).abe/types.pyexports JSON aliases, handler protocols, and theMessageQueueBackendProtocol. The file is included inpy.typedso downstream projects receive type information.abe/__init__.pywires the public API, re-exporting critical types and helpers for package consumers.
Documentation (docs/)β
docs/contents/holds authored Markdown/MDX for architecture guides, quick starts, API references, and contributor docs.docs/src/contains Docusaurus React components, CSS, and layout customisations (for exampledocs/src/components/HomepageFeatures/index.tsx).docs/static/stores images and static assets referenced by the site.- Docusaurus configuration, sidebars, and versioning live alongside the content;
package.jsonscripts run the docs locally or in CI.
Examples (examples/)β
examples/type_checking/illustrates the Protocols fromabe/types.py, showing how to implement handlers and message-queue backends that satisfy the exported contracts.
Tests (test/)β
test/unit_test/covers granular behaviour, including message-queue consumers (test/unit_test/backends/queue/test_consumer.py) and logging utilities.test/integration_test/exercises end-to-end flows within a single process, such as logging configuration scenarios.test/contract_test/codifies provider expectationsβfor example,test/contract_test/backends/queue/base/test_queue_backend_contract.pyvalidates compliance withMessageQueueBackendProtocol.test/e2e_test/is reserved for whole-system validations that replicate production flows when applicable.
Automation & Toolingβ
.github/workflows/defines CI pipelines (type checking, docs previews, release orchestration) and reusable workflow definitions consumed across repositories.scripts/ci/verify_type_checking.shenforces thatabe/types.pyexports the expected aliases and protocols; other scripts underscripts/docker/andscripts/ci/support repeatable local and CI tasks.- Root configuration files include
pyproject.toml,mypy.ini,.pylintrc,.coveragerc,pytest.ini,.pre-commit-config.yaml, andcodecov.yml, ensuring consistent tooling across contributors.
Auxiliary Artifactsβ
- Additional metadata such as
LICENSE,README.md, andsonar-project.propertieslive at the repository root for discoverability.
Maintaining this organisation keeps production modules (abe/), developer documentation (docs/), and quality gates (test/, scripts/, .github/) in sync. When you introduce new backends, utilities, or docs, mirror the existing patterns so they remain easy to discover and integrate into automation.