An SDK for interacting with the Vantage API, attempts to maintain parity with the API, provides type safety via codegen Pydantic classes and manages pagination
Project description
Client for Vantage
This SDK is a Python client built around the Vantage API, providing a streamlined interface to work with numerous API endpoints. It leverages asynchronous programming and concurrency to efficiently handle data retrieval across multiple pages, significantly reducing wait times through parallel request processing. It also provides comprehensive type support through Pydantic 2.0 BaseModels, which were generated by parsing the API's OpenAPI spec. This ensures type safety and provides excellent IDE autocompletion while maintaining strict validation of request and response data - no need to constantly refer to the API documentation.
Usage
Install the library
uv add client-for-vantage
Inititate the SDK
from vantage_sdk import VantageSDK
from vantage_sdk.models import CreateCostReport
vantage = VantageSDK(vantage_api_key)
cost_report = CreateCostReport(
title="Test Cost Report",
workspace_token="workspace_abcdef123456",
groupings="provider,service,region",
filter="costs.provider = 'aws'",
saved_filter_tokens=["sf_1", "sf_2"],
business_metric_tokens_with_metadata=[business_metric_1, business_metric_2],
folder_token="folder_abcdef123456",
settings=settings,
previous_period_start_date="2024-01-01",
previous_period_end_date="2024-01-31",
start_date="2024-02-01",
end_date="2024-02-28",
date_interval=DateInterval.this_month,
chart_type=ChartType.line,
date_bin=DateBin.cumulative
)
response = vantage.create_cost_report(cost_report)
Supported Endpoints
This SDK supports all endpoints from the Vantage API. While comprehensive test coverage exists for most endpoints, some endpoints have limited test coverage due to various constraints.
Endpoints with Testing Limitations
The following endpoints are available but should be used with caution as they have limited automated test coverage:
- Anomaly Alerts: API access is limited as these can only be created via the UI
- Billing Rules: Requires special enterprise permissions
- Managed Accounts: Requires special enterprise permissions
- Resources: Performance issues with bulk operations
- Tags: Limited test coverage
- Unit Costs: Requires actual cost data for exports
- User Feedback: Limited testing to avoid creating test data in production
- Workspaces: Limited testing to avoid affecting production workspaces
Contributing
See CONTRIBUTORS.md for development setup, testing guidelines, and instructions for regenerating models.
Project details
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 client_for_vantage-1.0.0.tar.gz.
File metadata
- Download URL: client_for_vantage-1.0.0.tar.gz
- Upload date:
- Size: 45.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
591df05ce570954e564eeebcc29f59504271bb70beed6f9b02038d35627fdd12
|
|
| MD5 |
74f917005eafa7d2dd1e179fe5cb257a
|
|
| BLAKE2b-256 |
016e9472396557f9561f41e36ce87cd1ba48f2b1541ca3ded666772fe44fb937
|
Provenance
The following attestation bundles were made for client_for_vantage-1.0.0.tar.gz:
Publisher:
python-release.yml on block/client-for-vantage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
client_for_vantage-1.0.0.tar.gz -
Subject digest:
591df05ce570954e564eeebcc29f59504271bb70beed6f9b02038d35627fdd12 - Sigstore transparency entry: 771529278
- Sigstore integration time:
-
Permalink:
block/client-for-vantage@a048cf08808adbe142d26c5c681e4528746e00b4 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/block
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@a048cf08808adbe142d26c5c681e4528746e00b4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file client_for_vantage-1.0.0-py3-none-any.whl.
File metadata
- Download URL: client_for_vantage-1.0.0-py3-none-any.whl
- Upload date:
- Size: 48.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d50fe881fdc8c3ca4f9a3a34dc19959d5f83b614a09b1d5f351c351487e2dfa
|
|
| MD5 |
61e0eadf1da8cf613bb2e55d494656e4
|
|
| BLAKE2b-256 |
960923d26e4a5193a6f03076b6b90506710ed0031b0b409c95f573472286e5ae
|
Provenance
The following attestation bundles were made for client_for_vantage-1.0.0-py3-none-any.whl:
Publisher:
python-release.yml on block/client-for-vantage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
client_for_vantage-1.0.0-py3-none-any.whl -
Subject digest:
2d50fe881fdc8c3ca4f9a3a34dc19959d5f83b614a09b1d5f351c351487e2dfa - Sigstore transparency entry: 771529282
- Sigstore integration time:
-
Permalink:
block/client-for-vantage@a048cf08808adbe142d26c5c681e4528746e00b4 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/block
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@a048cf08808adbe142d26c5c681e4528746e00b4 -
Trigger Event:
release
-
Statement type: