The Python SDK (fivexer) supports Python 3.9+, ships sync and async clients for all three credential planes, and is type-annotated end to end (py.typed).
Install
bashpip install fivexer
Quickstart
pythonfrom fivexer import Fivexer, CreateTask, UpsertWorker, ListDecisionsQuery client = Fivexer(base_url="https://api.fivexer.com", api_key="sk_test_...") client.workers.upsert(UpsertWorker(id="agent_1", tags=["english", "billing"])) task = client.tasks.create(CreateTask(tags=["english", "billing"], priority=90)) print(task.id, task.status) decisions = client.decisions.list(ListDecisionsQuery(task_id=task.id))
Async
pythonfrom fivexer import AsyncFivexer client = AsyncFivexer(base_url="https://api.fivexer.com", api_key="sk_test_...") worker_id = await client.workers.upsert(UpsertWorker(id="agent_1", tags=["english"]))
Errors and quotas
pythonfrom fivexer import FivexerApiError try: client.tasks.create(CreateTask(tags=["english"])) except FivexerApiError as e: print(e.status_code, e.code) print(e.retry_after) print(client.quota.task_rate_remaining)
Worker portal
pythonfrom fivexer import FivexerWorker, WorkerLogin worker = FivexerWorker(base_url="https://api.fivexer.com") worker.login(WorkerLogin(workspace_id="ws_1", worker_id="agent_1", pin="4821")) worker.accept(worker.queue().task_ids[0])
Supervisor
pythonfrom fivexer import FivexerSupervisor, AcceptSupervisorInvite sv = FivexerSupervisor(base_url="https://api.fivexer.com") sv.accept_invite(AcceptSupervisorInvite(token=token_from_link)) board = sv.overview() sv.assign(board.parked[0].id, board.crew[0].worker_id)
Supervisor actions are flat methods (unpark, set_priority, assign, set_availability).
See the supervisor plane.
Every session client has an async twin — AsyncFivexer, AsyncFivexerWorker, and
AsyncFivexerSupervisor — with the same method names. The sync clients are context managers, so
with FivexerWorker(...) as worker: closes the underlying connection pool for you.
Webhooks
pythonfrom fivexer import Webhook event = Webhook.construct_event( payload=raw_body_bytes, header=request.headers["x-fivexer-signature"], secret="whsec_...", )