Nixflex Python SDK — 0.4.0 candidate
Building with AI? Tell your assistant to read https://docs.nixflex.com/ai-rules.md first - the rules for building on Nixflex (safe defaults, costs, what to ask before acting). Full docs: https://docs.nixflex.com
B57 deletion and voice campaign delete: see B57-DELETES.md. K9 is an unpublished candidate; one DELETE, never an automatic retry.
Python 3.9+, httpx. Install the approved release using pip install nixflex; local checks use the wheel.
import os
from nixflex import Nixflex, AsyncNixflex
with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"]) as client:
agents = client.agents.list(limit=1)
async def read():
async with AsyncNixflex(api_key=os.environ["NIXFLEX_API_KEY"]) as client:
return await client.agents.list(limit=1)
Sync/async have the same resource methods. Await async JSON; async for streams (no initial await). File helpers accept a path and stream chunks. max_retries=0 disables GET retry when the application owns policy.
Contract and safety
K1–K5 cover 140 of 141 public inventory operations in Node/CLI/Python. Private signing-secret retrieval is deliberately excluded. Dedicated Knowledge keyterms is additional to the old denominator. Personal login, invite acceptance, ownership transfer and account closure remain dashboard-only.
Only GET has bounded retries (default one). POST/PUT/PATCH/DELETE never automatically repeat, including 429, lost replies or malformed success. NixflexOutcomeUnknownError means outcome unknown and safe_to_retry false: inspect authoritative state before retrying. Never log raw errors, customer content, recordings, credentials or private integration responses.
Ownership, roles and active-account rules remain authoritative, along with refusals actually returned by each route. B57 single-call and campaign deletion ends running calls instead of waiting for settlement; other guarded cleanup routes keep their existing safety rules. Accepted deletion is not proof cleanup finished. API keys act with Owner authority and cannot impersonate a personal member session.
Omitted fields stay omitted. Agent defaults are dynamic greeting true, maximum duration 300 seconds, silence hangup 10 seconds; existing agents are not rewritten. Single-call variables use dynamic_vars; variables is a non-conflicting alias. Campaign recipient variables stay unchanged. SMS requires a sender; campaign message_template and scheduled_date are canonical.
Preserve page filters/string cursors; stop at next_cursor:null. Call iterators use pages 1–200; offset paging is not a snapshot. Integration PUT replaces configuration; custom-function PATCH changes supplied fields.
Webhook verification uses the organisation signing secret, independent of key rotation. Obtain it privately outside kits; verify the raw body before trusting a delivery.
Method reference
See METHODS.md, KNOWLEDGE.md, TEAM-INTEGRATIONS.md, ORGANISATIONS.md and CHANGELOG.md. Full API reference: https://docs.nixflex.com.
Unpublished candidates. Offline coverage does not prove successful mutations on staging; those tests remain manual.
Caller read: missing record versus wrong number
GET /v1/phone-numbers/:phoneNumber/callers/:callerNumber returns HTTP 404 with code caller_not_found when the owned number has no saved record for that caller. HTTP 404 phone_number_not_found means the business number is missing or is not owned by this account; do not treat it as an empty caller record. Generic not_found is not the documented caller-absence response.
Node and Python raise NixflexNotFoundError with status=404 and the exact server code. CLI --json exits 1 and preserves error.status and error.code (it does not serialize a JavaScript exception class). Inspect the code; never swallow all 404s. The K5b staging checker passes its synthetic-caller absence check only for 404 caller_not_found and selects that probe's business number from the authenticated account list, excluding the two protected staging numbers. With no eligible number it reports PENDING and sends no caller request. Never log the key, headers or raw response body.
K6 additions
Four Google Calendar methods, private number credentials, SMS 409 handling and booking models. Read NUMBER-FEATURES.md for exact fields, safe errors and recovery. All earlier exclusions remain, except the two explicit K6 MCP additions noted there.
K7 additions
Read a call’s retained booking result and its saved outbound request. Optional UUID request_id adds duplicate protection without automatic redial. Prepare and save the ID before the first send. See CALL-REQUESTS.md for every state/error and KIT-EXAMPLES-K7.md for Node, CLI, Python sync/async and MCP examples. Existing no-ID calls keep their old behavior.
Metadata
Release files for nixflex 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nixflex-0.4.1.tar.gz | 109.2 kB | Without provenance | Details for nixflex-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nixflex-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for nixflex-0.4.1-py3-none-any.whl |
Total release size: 152.6 kB
Release files / nixflex-0.4.1.tar.gz
| Download URL | nixflex-0.4.1.tar.gz |
|---|---|
| Size | 109.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90944d9dd8c5c26489f03a49d2a6fc7c177984bc6cd65acddedd9b10b12b5a0c
|
|
BLAKE2b-256 checksum How to use checksums |
116acbb4e9aeefae805e055eeff58fda1419c4694731e93b386b1ebe12a97a76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / nixflex-0.4.1-py3-none-any.whl
| Download URL | nixflex-0.4.1-py3-none-any.whl |
|---|---|
| Size | 43.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73868652f808d2027ba2506b314510289a01b28cd591832021f18f5f84723ee5
|
|
BLAKE2b-256 checksum How to use checksums |
0709abc09b1f96e8b2391c0e38769defd20ccfb817f2a734cbb9c8ee60ea7dbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for nixflex 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.