Skip to main content

x402 Payment Protocol SDK for Python

Project description

tvm-x402

Python SDK for the x402 payment protocol (TRON-only).

Installation

pip install tvm-x402

Optional extras:

pip install "tvm-x402[tron]"
pip install "tvm-x402[fastapi]"
pip install "tvm-x402[flask]"
pip install "tvm-x402[all]"

Quick Start

from x402.clients import X402Client

client = X402Client()

If you want automatic handling of HTTP 402 responses, use X402HttpClient:

import httpx

from x402.clients import X402Client, X402HttpClient

x402_client = X402Client()
http_client = httpx.AsyncClient()
client = X402HttpClient(http_client=http_client, x402_client=x402_client)

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tvm_x402-0.1.1.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvm_x402-0.1.1-py3-none-any.whl (51.6 kB view details)

Uploaded Python 3

File details

Details for the file tvm_x402-0.1.1.tar.gz.

File metadata

  • Download URL: tvm_x402-0.1.1.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for tvm_x402-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5fad0af72776b1a410b79ab9d4907a8ebd745115694fdb954c555892ef27052e
MD5 451d600f0a1532beece4ff83f7edfa4e
BLAKE2b-256 65387b0e955d6a4dc8b85cd383dc3af3d49a613d44e8750ca69136ad6d800e99

See more details on using hashes here.

File details

Details for the file tvm_x402-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tvm_x402-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 51.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for tvm_x402-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d77225828de14d177ee54bedc104540ff23d355b6da1694b0556c7e63edc5bb8
MD5 d1b18173caac5ba47b7c7d6851c14c37
BLAKE2b-256 45c63bb191acdfd1e72e5b24da77a6c712b3c18f505d7af439984667b0f8409b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page