dreep package wraps every endpoint in this reference, adds typed errors, and
generates signed URLs correctly — including the one detail that is easy to get wrong by
hand (see Signed URLs).
- Sync and async.
DreepandAsyncDreepshare one API. Async runs on asyncio and trio. - Fully typed. Ships
py.typed. Transforms are aTypedDictwithLiteralvalues, sofit="squish"fails type checking before it ships. - One dependency.
httpx, and nothing else.
Installation
Authentication
Create an API key on the API Keys page of your dashboard.Quickstart
file can be bytes, a pathlib.Path, or a binary file object. A plain str is rejected
on purpose, because it could be either a path or the file’s content.
Async
AsyncDreep mirrors the sync client method for method, including the lazy iterator:
with block, call client.close() (or
await client.aclose()) when you are done, or hand in your own httpx client and keep
ownership of it.
Method reference
Every method takes keyword-only arguments after the file, so adding an argument never
changes the meaning of the others.
Responses
Responses come back as frozen dataclasses with snake_case attributes. Numbers the API sends as strings (sizeBytes: "245000" — Postgres BIGINT serialises that way over JSON)
are converted to int, so a.size_bytes + b.size_bytes adds rather than concatenating.
Any field the SDK doesn’t model yet is still available on .raw:
Timeouts
JSON calls time out after 30 seconds. Uploads don’t — a large file can legitimately take minutes — so passtimeout= on the call to bound one: