DraftFilterDeveloper API

Runnable clients

Examples

Start from a checked Python client project that targets the local emulator API by default and uses the same API-key contract as production.

Example projectexamples/api-client-python

Python Client Project

The project creates and polls score jobs and rewrite jobs, retries create calls with idempotency keys, lists paginated job history, attempts cancellation, and handles billing-policy and rate-limit errors without printing API keys.

Local target
http://127.0.0.1:17604/draftfilter-dev/us-central1/df_api
Production target
https://api.draftfilter.com
Rewrite option
Public candidateCount, 1 to 16

Run Locally

Start the Firebase emulator stack and the long-running Packet worker in separate shells, seed once, then run the final demo command from the repository root.

bash
deploy/gcp/firebase-df emulators:start --project draftfilter-dev
uv run df-worker --host 127.0.0.1 --port 17631
FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:17603 \
FIRESTORE_EMULATOR_HOST=127.0.0.1:17605 \
GCLOUD_PROJECT=draftfilter-dev \
GOOGLE_CLOUD_PROJECT=draftfilter-dev \
FIREBASE_PROJECT_ID=draftfilter-dev \
uv run df-emulators seed
uv run --project examples/api-client-python python examples/api-client-python/run_demo.py

Run Against Production

bash
DF_API_BASE_URL=https://api.draftfilter.com \
DF_API_KEY="df_live_key_..." \
uv run --project examples/api-client-python python examples/api-client-python/run_demo.py

Check Against OpenAPI

bash
uv run df-examples-check