Skip to main content

AOA

Python 3.12+ Apache-2.0 CI 87 tests 3.5.1

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.

Its graph history

The demo keeps its graph in graph.json, rebuilt by graph-builder write with every change of its model, so the file's git history is the graph's history. Paste this link into Maxitor's AOA Service URL field to walk through it, compare any two versions, and see the open pull requests after the newest one:

https://github.com/bystrovmaxim/aoa/blob/main/packages/aoa-demo/graph.json?version_link=https%3A%2F%2Fgithub.com%2Fbystrovmaxim%2Faoa%2Fblob%2Fmain%2Fpackages%2Faoa-demo%2Fpyproject.toml&version_key=project.version

The version under each point comes from this package's pyproject.toml. How to read the track is in Open a service's graph history.

Metadata

Release files for aoa-demo 3.12.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.12.0
File Size Uploaded Provenance Actions
aoa_demo-3.12.0.tar.gz 132.5 kB Without provenance Details for aoa_demo-3.12.0.tar.gz

Built distribution (wheel)

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

Total release size: 497.1 kB

Release files / aoa_demo-3.12.0.tar.gz

Download URL aoa_demo-3.12.0.tar.gz
Size 132.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b85a0d249ac524bbfda4f3722eac0b28fae9f0a8d8ccd320af40638f2f461e96
BLAKE2b-256 checksum
How to use checksums
f0baf4b61daa663582cb0b0a4201359ea001c622d328c9f0e62a1530ad830b48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.12.0-py3-none-any.whl

Download URL aoa_demo-3.12.0-py3-none-any.whl
Size 364.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9d04a998cfbcea8e7543ef11431c5a9212d05828dd102ffd5bc0ff5cdcab2f1
BLAKE2b-256 checksum
How to use checksums
929753bf1e516fff18679313246421768ec35f4640ab42a6c1ce62ae147db216
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.12.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