A1 Huakunjingxiu Billing SDK
Python SDK for interacting with the A1 Huakunjingxiu Billing API.
项目结构
billing-sdk/
├── billing/ # 主应用目录
│ ├── product/ # 产品模块
│ │ ├── __init__.py
│ │ └── schemas.py
│ ├── transaction/ # 交易模块
│ │ ├── __init__.py
│ │ └── schemas.py
│ ├── __init__.py
│ ├── exceptions.py
│ ├── http.py
│ └── schemas.py
├── tests/ # 测试目录
│ └── test_transaction_create.py
├── docs/ # 文档目录
├── examples/ # 示例目录
│ ├── product/ # 产品示例
│ │ ├── __init__.py
│ │ └── create_token_example.py
│ ├── transaction/ # 交易示例
│ │ ├── __init__.py
│ │ └── create_transaction_example.py
│ ├── __init__.py
│ └── README.md
├── .clinerules
├── .cursorrules
├── .gitignore
├── .pre-commit-config.yaml
├── LICENSE
├── pyproject.toml
├── README.md
└── uv.lock
运行示例
运行示例代码前需要设置PYTHONPATH环境变量:
$env:PYTHONPATH=$PWD
uv run examples/product/create_token_example.py
export PYTHONPATH=$(pwd)
uv run examples/product/create_token_example.py
Installation
pip install billing-sdk
Usage
from billing import Client
# Initialize client
client = Client(api_key="your_api_key")
# Create an invoice
invoice = client.create_invoice(
amount=100.00,
description="Monthly subscription"
)
# Get invoice details
invoice_details = client.get_invoice(invoice["id"])
# List invoices
invoices = client.list_invoices(limit=10)
Error Handling
The SDK provides several exception types:
from billing import (
BillingError,
AuthenticationError,
InvalidRequestError,
APIError
)
try:
# API calls
except AuthenticationError as e:
print("Invalid API key")
except InvalidRequestError as e:
print("Invalid request parameters")
except APIError as e:
print("Server error occurred")
except BillingError as e:
print("General billing error")
Development
Install development dependencies:
pip install -e ".[dev]"
Run tests:
pytest
License
MIT
Metadata
Release files for hkjx-billing-sdk 0.2.7
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 |
|---|---|---|---|---|
| hkjx_billing_sdk-0.2.7.tar.gz | 7.0 kB | Without provenance | Details for hkjx_billing_sdk-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hkjx_billing_sdk-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for hkjx_billing_sdk-0.2.7-py3-none-any.whl |
Total release size: 16.4 kB
Release files / hkjx_billing_sdk-0.2.7.tar.gz
| Download URL | hkjx_billing_sdk-0.2.7.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4ad07f729062eb174e8b9eafb8eca2c2d941d661b0da320abce00845a174307
|
|
BLAKE2b-256 checksum How to use checksums |
2f36926d6a028c0ea3cf282ca617d14693c85fc2e9fa956ced049d45878f9240
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.4
|
Release files / hkjx_billing_sdk-0.2.7-py3-none-any.whl
| Download URL | hkjx_billing_sdk-0.2.7-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f27865b67bcf3b0f468f1b13eea3aeb034500a5fab506f2ebaae3083e1f5828b
|
|
BLAKE2b-256 checksum How to use checksums |
376151fce626e4e920ba8f64493b7b863640289cd125e1408abd88bc692a616c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.4
|
Security for hkjx-billing-sdk 0.2.7
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.