Skip to main content

Cloud Billing

Python Version Tests

A comprehensive Python package for fetching billing information from Alibaba Cloud, AWS, Azure, and Huawei Cloud.

Supported Cloud Providers

  • Alibaba Cloud - Complete billing data retrieval with Kubernetes billing support
  • AWS - Cost and usage data from AWS Cost Explorer
  • Azure - Billing information from Azure Cost Management
  • Huawei Cloud - Monthly bill summary from Huawei BSS API

Key Features

  • 🌐 Multi-cloud support - Unified interface for multiple cloud providers
  • 📊 Comprehensive billing data - Detailed cost and usage information
  • 🔧 Easy integration - Simple Python API for all cloud providers
  • 📝 Type safety - Full type hints with Pydantic models
  • 🧪 Well tested - Comprehensive test suite

Quick Start

Install the package:

pip install cloud-billing

Get billing data from Alibaba Cloud:

from cloud_billing.alibaba_cloud import AlibabaCloudClient

client = AlibabaCloudClient(
    access_key_id="your_access_key",
    access_key_secret="your_secret_key",
    region_id="cn-hangzhou"
)

billing_data = client.fetch_instance_bill_by_billing_cycle(
    billing_cycle="2024-01"
)

Get cost data from AWS:

from cloud_billing.aws_cloud import AWSCloudClient

client = AWSCloudClient(
    access_key_id="your_access_key",
    secret_access_key="your_secret_key",
)

cost_data = client.get_cost_and_usage(
    time_period={"Start": "2024-01-01", "End": "2024-02-01"},
    granularity="MONTHLY",
    group_by=[{"Type": "DIMENSION", "Key": "SERVICE"}],
)

Get monthly bill from Huawei Cloud:

from cloud_billing.huawei_cloud import HuaweiCloudClient

client = HuaweiCloudClient(
    access_key="your_access_key",
    secret_key="your_secret_key",
    domain_id="your_domain_id",
)

bill_items, error = client.query_monthly_bill_summary(bill_cycle="2024-01")

License

This project is licensed under the GPL-3.0-or-later License - see the LICENSE file for details.

Metadata

Release files for cloud-billing 0.1.25

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

Source distribution (sdist)

Source distribution for cloud-billing 0.1.25
File Size Uploaded Provenance Actions
cloud_billing-0.1.25.tar.gz 35.2 kB With provenance Details for cloud_billing-0.1.25.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cloud-billing 0.1.25
File Interpreter ABI Platform Actions
cloud_billing-0.1.25-py3-none-any.whl Python 3 none any Details for cloud_billing-0.1.25-py3-none-any.whl

Total release size: 61.9 kB

Release files / cloud_billing-0.1.25.tar.gz

Download URL cloud_billing-0.1.25.tar.gz
Size 35.2 kB
Tags Source
SHA-256 checksum
How to use checksums
95f9eac50633c6e3953186e914f89891627fd6ce61f68668b86b39b606777703
BLAKE2b-256 checksum
How to use checksums
fda8b1eba31ffe9236094ae81b00411a4c602a6359720000d5772cc4fa832053
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 20, 2026.

Transparency log

Release files / cloud_billing-0.1.25-py3-none-any.whl

Download URL cloud_billing-0.1.25-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ffd95ac90cfa1338baedb4ddce52fb64be14f90d0e31f9602380460f4687442
BLAKE2b-256 checksum
How to use checksums
4f7357a50bb2d04b54b25f100fd643cae3afe6f53cfd259599725b87aa4388d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 20, 2026.

Transparency log

Security for cloud-billing 0.1.25

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cloud_billing-0.1.25.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 May 20, 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

0.1.25 This release

2 release files Full 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