Skip to main content

AOA

Python 3.12+ Apache-2.0 CI 1.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 2.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 2.0.0
File Size Uploaded Provenance Actions
aoa_demo-2.0.0.tar.gz 121.4 kB Without provenance Details for aoa_demo-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 476.4 kB

Release files / aoa_demo-2.0.0.tar.gz

Download URL aoa_demo-2.0.0.tar.gz
Size 121.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1c241f6cdec7d8552485b26739496bd10c4c6863bf229da17cfa4d62e7ceaf6b
BLAKE2b-256 checksum
How to use checksums
ebdb2b383aacfba5378be4bb983add4fc3655eb179982c5d091d57a5d42b7183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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-2.0.0-py3-none-any.whl

Download URL aoa_demo-2.0.0-py3-none-any.whl
Size 354.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f7af0d3ef4951160fcc79aca26a5c985abaad559af34704662aefd4225b65b7
BLAKE2b-256 checksum
How to use checksums
01beb152104d16d796eb31c7fe46e5717d618ba84660853a21ee2f8092b5721c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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 2.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