Skip to main content

Nixflex Python SDK

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

Copy the whole API key from API Keys in your Nixflex dashboard and store it privately in NIXFLEX_API_KEY. Pass the value exactly as copied, including its colon. Raw HTTP requests use https://api.nixflex.com/v1 and the header Authorization: Bearer <whole key>. For the SDK or MCP server, use the origin https://api.nixflex.com. The client adds /v1 to requests.

Install with python -m pip install nixflex. The SDK requires Python 3.9 or later and uses httpx.

import os
from nixflex import AsyncNixflex, Nixflex

with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"]) as client:
    agents = client.agents.list(limit=1)

async def list_agents():
    async with AsyncNixflex(api_key=os.environ["NIXFLEX_API_KEY"]) as client:
        return await client.agents.list(limit=1)

Both clients expose the same resource methods. Await async JSON responses. Use async for directly on async streams. File helpers take a path and stream chunks. Set max_retries=0 if your application handles retries.

Requests and errors

GET requests retry once by default. Writes make one attempt, including after HTTP 429, a lost reply or a malformed success. If the SDK raises NixflexOutcomeUnknownError with safe_to_retry:false, inspect the server state before taking further action. Keep raw errors, credentials, customer content, recordings and private integration responses out of logs.

An organisation API key acts with Owner authority. Personal login, invitation acceptance, ownership transfer and account closure require a dashboard session. Use the organisation’s separate signing secret to verify the original webhook body. API-key rotation leaves that signing secret intact.

Omitting an optional field preserves its default. New agents default to dynamic greeting on, a maximum duration of 300 seconds and a silence timeout of 10 seconds. For single calls, use dynamic_vars or its non-conflicting alias variables. Campaign recipient variables keep their own shape. Supply an SMS sender and use message_template and scheduled_date for campaigns.

Keep filters and string cursors when paging. Stop when next_cursor is null. Call iterators accept page sizes from 1 to 200. Offset pages can change between requests. An integration PUT replaces its configuration. A custom-function PATCH changes only the supplied fields.

A caller lookup can return two different 404 codes. caller_not_found means the owned business number has no saved record for that caller. phone_number_not_found means the business number is missing or belongs to another account. Both SDKs expose the exact code on NixflexNotFoundError. CLI JSON includes error.status and error.code and exits with status 1.

Guides

Package guide · Developer contact: dev@nixflex.com

Metadata

Release files for nixflex 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nixflex 0.4.2
File Size Uploaded Provenance Actions
nixflex-0.4.2.tar.gz 69.8 kB Without provenance Details for nixflex-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nixflex 0.4.2
File Interpreter ABI Platform Actions
nixflex-0.4.2-py3-none-any.whl Python 3 none any Details for nixflex-0.4.2-py3-none-any.whl

Total release size: 112.4 kB

Release files / nixflex-0.4.2.tar.gz

Download URL nixflex-0.4.2.tar.gz
Size 69.8 kB
Tags Source
SHA-256 checksum
How to use checksums
da51fa22487d91d42b0bbc3f34737cbbd12b7ad868d2b7f88284638a0f1a26d5
BLAKE2b-256 checksum
How to use checksums
590b24304204e14421ec96a98e8ef78a9d614d91034641e992289e3fd77a097e
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.2-py3-none-any.whl

Download URL nixflex-0.4.2-py3-none-any.whl
Size 42.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e98b59aafc33b3afefa15fc392451846b0194f358f61ce14c9d1dd951ac17c9
BLAKE2b-256 checksum
How to use checksums
647534ea141dcf3fb3559cdd14df66456a2838c70eaf600aed464292bcc60e55
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.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page