Observed since 20 Oct, 18:00 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Accord sync server for FastAPI: router, settings and CLI.
The Accord sync server for FastAPI: a router with POST /v1/push, GET /v1/pull and
GET /health, and a CLI for migrations and compaction. All behaviour (auth, limits, CORS, rate
limits, status codes, Accord-Protocol and Retry-After headers) comes from
accordsync-server; this package only routes to it. Part of Accord.
pip install accordsync-fastapi uvicorn
from accordsync_core import define_schema, lww
from accordsync_server import Access, Auth, define_server
from accordsync_fastapi import accord_router
from fastapi import FastAPI
server = define_server(
schema=define_schema({"note": {"owner": lww(), "title": lww()}}),
scopes={"note": lambda r: [f"user:{r.fields.get('owner')}"]},
access=lambda claims: Access(read=[f"user:{claims['sub']}"], write=[f"user:{claims['sub']}"]),
auth=Auth.jwks("https://auth.example/.well-known/jwks.json", issuer="https://auth.example"),
)
app = FastAPI()
app.include_router(accord_router(server, database_url="postgresql://...", prefix="/sync"))
Given a definition, the router owns a psycopg pool (pool_size, default 20): it opens it in the
application's lifespan and closes it at shutdown. You can instead pass an
AccordServer(definition, pool) whose pool you manage; router_server(router) returns the server
behind a router. Endpoints are plain def functions run in FastAPI's thread pool.
Run the migrations before serving:
ACCORD_DATABASE_URL=postgresql://... python -m accordsync_fastapi migrate
With compaction.interval_ms > 0 in the definition (default one hour), the router's lifespan
compacts on that interval in a background thread of each process. With several worker processes,
pass schedule_compaction=False and run compaction from cron instead:
ACCORD_DATABASE_URL=postgresql://... python -m accordsync_fastapi compact --definition myapp.sync:server
/health touches the database and answers 503 when it is unreachable.limits.max_body_bytes) is enforced while reading the body.examples/fastapi_app in this repository serves the conformance profile and passes the shared
server conformance suite (68/68). Its control API is for tests only (ACCORD_CONTROL=1).Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.2 | 8 Oct 2026 | 2 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 18:00 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:72570897364f06ac94941d99916d14e2e5942b14f193203a8991253997113950