Skip to main content

Client for Vantage

Tests Package version Supported Python versions License Pydantic v2

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,
    CreateCostReportChartType,
    CreateCostReportDateBin,
)

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",
    chart_type=CreateCostReportChartType.line,
    date_bin=CreateCostReportDateBin.cumulative,
)

response = vantage.create_cost_report(cost_report)

Supported Endpoints

This SDK supports all endpoints from the Vantage API. Most endpoints are covered by live API tests, but a small set of methods are skipped in CI because they require special permissions or account configuration. Those skipped methods are expected to work based on the OpenAPI spec and we keep the request and response models aligned with it, but we cannot validate them in automated tests. The remaining methods are verified against the live API and are expected to work as implemented.

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
  • Teams: Sandbox account lacks team permissions, so related tests are skipped in VCR recordings
  • Tags: Sandbox account has no tags configured, so tag update and value tests are skipped in VCR recordings

Contributing

See CONTRIBUTORS.md for development setup, testing guidelines, and instructions for regenerating models.

Testing

See CONTRIBUTORS.md for VCR-backed and live testing workflows.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

client_for_vantage-2.2.0.tar.gz (93.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

client_for_vantage-2.2.0-py3-none-any.whl (307.2 kB view details)

Uploaded Python 3

File details

Details for the file client_for_vantage-2.2.0.tar.gz.

File metadata

  • Download URL: client_for_vantage-2.2.0.tar.gz
  • Upload date:
  • Size: 93.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for client_for_vantage-2.2.0.tar.gz
Algorithm Hash digest
SHA256 4636bf3d48390c287ae4da1cba78bc9a9bef8000cd3c20a4f5eab2f779d35ff5
MD5 047b3de9ee1ae1830863c1c1ad566b11
BLAKE2b-256 de1873cfa2e3db7e25602c5b8b55c93f9e30b77c505ee4e545d099ee270ef724

See more details on using hashes here.

Provenance

The following attestation bundles were made for client_for_vantage-2.2.0.tar.gz:

Publisher: python-release.yml on block/client-for-vantage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file client_for_vantage-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for client_for_vantage-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7471a7a39bc76d12b551b0f5ee683ba828adb0729a32a8b4d0d8a8cc63913449
MD5 95bd68c81cf2787231fa59bea7eac0d7
BLAKE2b-256 8d9bfe0a2e8e52bd8e028a25fbc937572bfdc15c9b8a86e00c8126b428bb4ab8

See more details on using hashes here.

Provenance

The following attestation bundles were made for client_for_vantage-2.2.0-py3-none-any.whl:

Publisher: python-release.yml on block/client-for-vantage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.2.1

2 files

This release

2.2.0 This release

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

1.4.1

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.1

2 files

1.0.0

2 files

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