Skip to main content

Fast Billing SDK

Async Python 3.11+ client for reporting completed business tasks.

python -m pip install fast-billing-sdk==1.0.0
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.0

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

Source distribution (sdist)

Source distribution for fast-billing-sdk 1.0.0
File Size Uploaded Provenance Actions
fast_billing_sdk-1.0.0.tar.gz 5.7 kB Without provenance Details for fast_billing_sdk-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fast-billing-sdk 1.0.0
File Interpreter ABI Platform Actions
fast_billing_sdk-1.0.0-py3-none-any.whl Python 3 none any Details for fast_billing_sdk-1.0.0-py3-none-any.whl

Total release size: 11.8 kB

Release files / fast_billing_sdk-1.0.0.tar.gz

Download URL fast_billing_sdk-1.0.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e083457393cbb3f622386b396b655751feeb5e61ce5098677bf386912ccae9df
BLAKE2b-256 checksum
How to use checksums
30402cfafbffa6266f98bf8979270dd2f98cfea01198f49e0910c9068b6d0018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / fast_billing_sdk-1.0.0-py3-none-any.whl

Download URL fast_billing_sdk-1.0.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7804345474cbcd19cedaca048dc675f4fe427e6d522d59a240f7150940f87659
BLAKE2b-256 checksum
How to use checksums
42378a8c35a00efc0916c71766d022fa5b696dc583d8d2434ff30d46e2630c36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for fast-billing-sdk 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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