Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

nextx-sdk

Thư viện chính thức để gọi NextX API từ Python, hỗ trợ cả đồng bộ và async.

Mã trong kho này được sinh tự động từ OpenAPI của NextX. Vui lòng không sửa trực tiếp, xem CONTRIBUTING.md.

Cài đặt

pip install nextx-sdk

Yêu cầu Python 3.11 trở lên.

Bắt đầu

import os
from nextx_sdk import create_client, SANDBOX_URL
from nextx_sdk.api.crm import contacts_list

# Khoá API của workspace, tạo trong phần mềm NextX, gửi ở header X-Api-Key
nx = create_client(api_key=os.environ["NEXTX_API_KEY"], base_url=SANDBOX_URL)

page = contacts_list.sync(client=nx, page_size=20)
for c in page.items or []:
    print(c.full_name)

# async
page = await contacts_list.asyncio(client=nx, page_size=20)

Ứng dụng đối tác dùng OAuth 2.0 thì tạo client bằng create_client(access_token=token).

Nhận webhook

Kiểm chữ ký theo chuẩn Standard Webhooks. Truyền thân gốc (bytes), không phải JSON đã parse:

from nextx_sdk.webhooks import verify_webhook, WebhookVerificationError

event = verify_webhook(raw_body, request.headers, os.environ["NEXTX_WEBHOOK_SECRET"])
if event["type"] == "call.completed":
    call = event["data"]["object"]          # cùng hình dạng GET /api/v1/call/partner/calls/{id}

Sai chữ ký hoặc lệch giờ quá 5 phút thì ném WebhookVerificationError. Dùng event["id"] để bỏ qua lần giao trùng.

Ghi chú

  • Mỗi endpoint là một mô-đun trong nextx_sdk.api.<phân hệ> với 4 hàm: sync, sync_detailed, asyncio, asyncio_detailed. Các hàm *_detailed trả thêm mã trạng thái và header.
  • Mặc định client gọi môi trường production (PROD_URL). Khi thử nghiệm, dùng SANDBOX_URL với khoá sandbox.
  • Mã trạng thái không có trong tài liệu sẽ ném nextx_sdk.errors.UnexpectedStatus.

Tài liệu

Giấy phép MIT.

Metadata

Release files for nextx-sdk 0.3.7b60

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

Source distribution (sdist)

Source distribution for nextx-sdk 0.3.7b60
File Size Uploaded Provenance Actions
nextx_sdk-0.3.7b60.tar.gz 266.2 kB With provenance Details for nextx_sdk-0.3.7b60.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nextx-sdk 0.3.7b60
File Interpreter ABI Platform Actions
nextx_sdk-0.3.7b60-py3-none-any.whl Python 3 none any Details for nextx_sdk-0.3.7b60-py3-none-any.whl

Total release size: 851.6 kB

Release files / nextx_sdk-0.3.7b60.tar.gz

Download URL nextx_sdk-0.3.7b60.tar.gz
Size 266.2 kB
Tags Source
SHA-256 checksum
How to use checksums
34f488ef9ec1a61acf9e23fbb9cf10a7f5e4b4051a9dbd63a021e15709f5f82c
BLAKE2b-256 checksum
How to use checksums
b671ffafb5fa5ad3f2fea4aac34c8e880535e5cae38263e7d72a6e9e437b9348
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / nextx_sdk-0.3.7b60-py3-none-any.whl

Download URL nextx_sdk-0.3.7b60-py3-none-any.whl
Size 585.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eb89b5c29a69e6aa7dad699a647295cf14eb7f9fa4e70544bd59ca5c76aebca
BLAKE2b-256 checksum
How to use checksums
e42635336022f2d9a3fd62463564ad0ba0e5fe3b0af7702409d12cfe9d2644b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for nextx-sdk 0.3.7b60

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nextx_sdk-0.3.7b60.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release
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