Skip to main content

AOA

Python 3.12+ Apache-2.0 CI 79 tests 3.0.0

aoa-demo: Reference Services for AOA

aoa-demo contains two runnable reference services — a FastAPI HTTP service and an MCP server — built on the same domain model: orders, products, and customers. Both services expose the same Action operations over different transports, demonstrating how a single piece of business logic is published via FastApiAdapter for REST clients and via McpAdapter for AI agents without duplicating any logic. The package also serves as the integration fixture used in the AOA test suite.

The identity domain: one connection per call, with or without a database

POST /api/v1/identity/lookup and the MCP tool identity.lookup are the reference for a database-backed resource. The action declares IdentityStoreBase under the connection key identity; the route supplies a value per call — created for the call and closed after it — so concurrent calls never share a connection and each transaction belongs to one caller. The domain asks storage for two things — a person, and a login recorded inside a transaction — and each store supplies them its own way: over PostgreSQL the domain runs its statements through the driver's protected helpers (_execute, _fetchrow) from methods of its own, and in memory it answers from dictionaries.

It runs in two modes, and only the supplied value differs:

Mode When What the route supplies
in memory AOA_DEMO_POSTGRES_DSN is unset IdentityStoreStub — the same two operations, no database, no driver
over a pool the variable names a database IdentityStore(pool=…) — one connection borrowed per call

The pool is created once when the service starts and closed when it stops. An MCP service has no request-scoped startup hook, but its server has one, so both transports pass the same pool_lifespan to build() — no wrapper to write.

# Database-free: answers from memory; needs no PostgreSQL and no driver.
uv run uvicorn aoa.demo.fastapi_mcp_services.app_fastapi_service:app --port 8000

# Over a pool: install the extra and name the database.
uv add "aoa-demo[postgres]"
AOA_DEMO_POSTGRES_DSN=postgresql://user:pass@localhost/db \
  uv run uvicorn aoa.demo.fastapi_mcp_services.app_fastapi_service:app --port 8000

The pool states its size bounds (min_size=1, max_size=10) where it is created; the wait for a free connection is bounded on the resource (IdentityStore.acquire_timeout = 30.0), because create_pool has no such parameter — a timeout= there would bound connecting, not waiting.

What each mode is for, and what the resource does with its connection, is in src/aoa/demo/model/identity/README.md.

Metadata

Release files for aoa-demo 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aoa-demo 3.0.0
File Size Uploaded Provenance Actions
aoa_demo-3.0.0.tar.gz 128.6 kB Without provenance Details for aoa_demo-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aoa-demo 3.0.0
File Interpreter ABI Platform Actions
aoa_demo-3.0.0-py3-none-any.whl Python 3 none any Details for aoa_demo-3.0.0-py3-none-any.whl

Total release size: 490.8 kB

Release files / aoa_demo-3.0.0.tar.gz

Download URL aoa_demo-3.0.0.tar.gz
Size 128.6 kB
Tags Source
SHA-256 checksum
How to use checksums
984ef4badf8b1848fcd6877d7eb2b60ac201f0f5158b6621f4ecac1f19eabb73
BLAKE2b-256 checksum
How to use checksums
7206c6fdc2251d1e1986d81285e51f7a0798479b03ac1c9e71965296174d675d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / aoa_demo-3.0.0-py3-none-any.whl

Download URL aoa_demo-3.0.0-py3-none-any.whl
Size 362.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee77ed10b5c381134cc086b3dc2a359e545f40f343138b991ab7a6f2fcecdf93
BLAKE2b-256 checksum
How to use checksums
1049c7b91fd7f12ca5d89215892a61629f7c639ceedb952f614a809516c11a59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for aoa-demo 3.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page