Fast Billing SDK
Async Python 3.11+ client for reporting completed business tasks.
Set BILLING_API_URL to the service origin or its /api base. For example,
https://example.com, https://example.com/, and https://example.com/api/
all send reports to https://example.com/api/v1/events/report.
python -m pip install fast-billing-sdk==1.0.1
import os
from fast_billing_sdk import AsyncBillingClient
async def report_completed_task(event):
async with AsyncBillingClient(
base_url=os.environ["BILLING_API_URL"],
product_code=os.environ["BILLING_PRODUCT_CODE"],
source_system=os.environ["BILLING_SOURCE_SYSTEM"],
source_env=os.environ["BILLING_SOURCE_ENV"],
) as billing:
return await billing.report(event)
A task dictionary contains task_id, completed_at (Unix seconds), source, team_id, and usage. Web tasks supply user_id, and open API tasks supply app_id. Each usage entry contains a billing point code and a positive quantity. Optional ext carries business metadata. The client sends one report for the entire task.
For durable retries, create a prepared event with billing.prepare_event(event), persist the result of to_json(), then send it via await billing.report(prepared_event). Use PreparedEvent(saved_json) to restore that exact payload. A SUCCESS result confirms API receipt. processing_status reflects asynchronous processing. Reuse the saved payload after an UNKNOWN result.
Metadata
Release files for fast-billing-sdk 1.0.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 |
|---|---|---|---|---|
| fast_billing_sdk-1.0.1.tar.gz | 6.3 kB | Without provenance | Details for fast_billing_sdk-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_billing_sdk-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for fast_billing_sdk-1.0.1-py3-none-any.whl |
Total release size: 12.5 kB
Release files / fast_billing_sdk-1.0.1.tar.gz
| Download URL | fast_billing_sdk-1.0.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
795588b5acae59e31d64b2eccd66b6b1e8eed9031aa06b918d916e7bf4f115a6
|
|
BLAKE2b-256 checksum How to use checksums |
745bf77e5cf344c2eac38d089a0a3635a9be289aa3c9dd8cad869c471c86efe5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fast_billing_sdk-1.0.1-py3-none-any.whl
| Download URL | fast_billing_sdk-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
714463b25df35b90592be919991fb97dd0a71e1c92e9d9e1496a37c9dbb32145
|
|
BLAKE2b-256 checksum How to use checksums |
7e227c037f7f33b59b8c07c1916b227e2b928d9d0bd6090ac2d0f95616b7810a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for fast-billing-sdk 1.0.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.