Skip to main content
The Python SDK is for your server, for example a FastAPI app or a worker. Your coding agent adds and wires it during the setup. For the browser part of your app, see the JavaScript and TypeScript SDK.
The SDK never blocks your app. If the address, the key or the manifest digest is missing, it switches itself off and says so at start. Do not switch it off yourself in code: then your app stays silent when a setting is missing or renamed.

Install

Your agent adds the package everydeck with the exact version everydeck names to the requirements of the part that runs it. That includes the requirements a Docker build sees.

The client

Create one client per process. Your agent passes the everydeck address, the server key and the manifest digest the way your app reads its settings.
If your server talks to Supabase with the service key, Everydeck.from_supabase(…) reads these settings from your Supabase project. Then you set nothing at your host. Otherwise you add three settings at your host: see Going live.

FastAPI and Starlette

One line reports every unhandled exception of a request and every answer from 500 to 599:
It sends the method, the route as a pattern like /orders/:id, the status, the duration, the error class, the cleaned message and the stack. Never bodies, query strings or cookies. Your app’s answer stays unchanged. A 4xx counts as an answer of your app, not as an error.
There is no Flask or Django integration (WSGI). The setup also does not add this middleware by itself yet: your agent wires the central error path with everydeck.error(…) instead.

Results of flows: signal

Send a signal after the commit, with the record of the result:
Take the run id from the request header x-everydeck-operation-id, which the browser SDK sets. Then browser and server share one run.

Errors

  • The keys of http are written in snake_case, as above.
  • error_class_of(e) turns an exception into a short class and keeps acronyms together: APIError becomes api_error.
  • With exc, the SDK sends the stack and, for up to 5 frames in your own code, the line and 5 lines before and after. Libraries and the standard library get none.
  • Errors outside a request, like in a background job, need their own everydeck.error(…).

Payments

The events and rules are the same as in the JavaScript SDK: see Payments. Without a person and an organization, the payment counts for nobody, and the SDK writes a warning to your log.

AI calls

everydeck.wrap_anthropic(Anthropic()) works the same, also for async clients. For an AI API without such a client, report the numbers after each call:
everydeck never stores the prompt, the answer or your provider key.

Heartbeats of jobs

A scheduled job sends its heartbeat at the end of each run that worked, with its id from the app map:
See App parts and heartbeats.

Checking requests from everydeck

Requests from everydeck to your app carry a signature. If you build your own app bridge, check each request with one call:
The read bridge from the SDK does this by itself.

Dates from the read bridge

The read bridge sends a calendar day (a column of type date) as midnight UTC of that day, in any time zone of your server. Your own code gets dates as before.