- First release.
FlightBytewithflights(get,timeline),subscriptions(create,list,list_all,get,update,delete,pause,resume,send_test,deliveries,events,secret,rotate_secret) andcountries(list,get,flag_url). Every method takes atimeoutof its own.TypedDicttypes for every response, checked against the API's OpenAPI document. Responses come back exactly as the API sent them, as plain dicts.FlightByteErrorand a subclass for each error status, including thecredits_exhaustedreason of a 402 with itsbalanceandexpires_at, andAPIConnectionErrorfor requests that got no response. Every error survives pickling.Webhook.verify,Webhook.is_valid,Webhook.construct_eventandWebhook.signforx-flightbyte-signaturewebhook signatures, on the standard library'shmac.- An empty webhook signing secret is refused with a
ValueError, since anyone can sign with an empty key. client.last_rate_limitfrom theX-RateLimit-*headers, as an immutableRateLimit.- Redirects to another origin, or from https to http, are never followed, so the API key stays with the API; a write is never sent twice.
- The timeout bounds the whole request, response body included.
- One client is safe to share across threads.
- No dependencies. Runs on Python 3.10 and later.