Skip to main content

accordsync-django

The Accord sync server for Django: an app with the /v1/push, /v1/pull and /health URLs, management commands accord_migrate and accord_compact, and a system check. All behaviour comes from accordsync-server; this package only routes to it. Part of Accord.

Install

pip install accordsync-django

Configure

# settings.py
INSTALLED_APPS = [..., "accordsync_django"]
ACCORD_SERVER = "myapp.sync:server"  # a ServerDefinition made with define_server(...)
ACCORD_DATABASE_URL = "postgresql://..."  # optional, see below
ACCORD_POOL_SIZE = 20  # optional
ACCORD_SCHEDULE_COMPACTION = True  # optional

# urls.py
urlpatterns = [path("sync/", include("accordsync_django.urls")), ...]

The database is ACCORD_DATABASE_URL (setting, else environment variable), or else the default database's settings, which must then use django.db.backends.postgresql. The sync server uses its own psycopg connection pool, opened on the first request, never Django's ORM connections. The views are CSRF-exempt, opt out of ATOMIC_REQUESTS, and need no session or auth middleware (requests authenticate with the JWT in Authorization).

manage.py check reports accordsync.E001 when ACCORD_SERVER is missing, cannot be imported or is not a ServerDefinition, and accordsync.E002 when no PostgreSQL database is configured.

python manage.py accord_migrate

Compaction

With compaction.interval_ms > 0 in the definition (default one hour), each process compacts on that interval in a background thread started by its first sync request. With several worker processes, set ACCORD_SCHEDULE_COMPACTION = False and run from cron:

python manage.py accord_compact

Notes

  • Serve with a threaded WSGI server (e.g. waitress, gunicorn --threads); each request holds a thread while it waits on PostgreSQL.
  • Rate limits are per process (in memory).
  • examples/django_app in this repository serves the conformance profile with waitress and passes the shared server conformance suite (68/68). Its control API is for tests only (ACCORD_CONTROL=1).

Metadata

Release files for accordsync-django 0.3.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 accordsync-django 0.3.0
File Size Uploaded
accordsync_django-0.3.0.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for accordsync-django 0.3.0
File Interpreter ABI Platform
accordsync_django-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / accordsync_django-0.3.0.tar.gz

Download URL accordsync_django-0.3.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0c03fc755fc4fa00efedfd5be528eafcc70c87572ec299361512078262abd06e
BLAKE2b-256 checksum
How to use checksums
62663ec6432cdc5d7e200cc8e10abf96cc1e95af7e54be1b5bedbe7d754d8683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / accordsync_django-0.3.0-py3-none-any.whl

Download URL accordsync_django-0.3.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a88e92511bd6bd9db09b43dfb785806b55c18288faf1bff25b083cab13d8628
BLAKE2b-256 checksum
How to use checksums
a368a0f32ee3c9f6df54b0811e1fdb53815205b366185a750281f588d570e78f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

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