Multi-cloud billing data retrieval SDK for Alibaba Cloud, AWS, Azure, and Huawei Cloud with unified API
Project description
Cloud Billing
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloud_billing-0.1.25.tar.gz.
File metadata
- Download URL: cloud_billing-0.1.25.tar.gz
- Upload date:
- Size: 35.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95f9eac50633c6e3953186e914f89891627fd6ce61f68668b86b39b606777703
|
|
| MD5 |
723691d714e8a120bd4bb673beabfced
|
|
| BLAKE2b-256 |
fda8b1eba31ffe9236094ae81b00411a4c602a6359720000d5772cc4fa832053
|
Provenance
The following attestation bundles were made for cloud_billing-0.1.25.tar.gz:
Publisher:
publish-pypi.yml on Visionary-Future/cloud-billing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloud_billing-0.1.25.tar.gz -
Subject digest:
95f9eac50633c6e3953186e914f89891627fd6ce61f68668b86b39b606777703 - Sigstore transparency entry: 1584713381
- Sigstore integration time:
-
Permalink:
Visionary-Future/cloud-billing@e847f8874e6e7ea2e1c8b12266e16f23372b8532 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Visionary-Future
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e847f8874e6e7ea2e1c8b12266e16f23372b8532 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file cloud_billing-0.1.25-py3-none-any.whl.
File metadata
- Download URL: cloud_billing-0.1.25-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ffd95ac90cfa1338baedb4ddce52fb64be14f90d0e31f9602380460f4687442
|
|
| MD5 |
3ede692ecc1d9c8ffed5b38eed0191f1
|
|
| BLAKE2b-256 |
4f7357a50bb2d04b54b25f100fd643cae3afe6f53cfd259599725b87aa4388d7
|
Provenance
The following attestation bundles were made for cloud_billing-0.1.25-py3-none-any.whl:
Publisher:
publish-pypi.yml on Visionary-Future/cloud-billing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloud_billing-0.1.25-py3-none-any.whl -
Subject digest:
2ffd95ac90cfa1338baedb4ddce52fb64be14f90d0e31f9602380460f4687442 - Sigstore transparency entry: 1584713533
- Sigstore integration time:
-
Permalink:
Visionary-Future/cloud-billing@e847f8874e6e7ea2e1c8b12266e16f23372b8532 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Visionary-Future
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e847f8874e6e7ea2e1c8b12266e16f23372b8532 -
Trigger Event:
workflow_dispatch
-
Statement type: