Skip to main content

infrawrench-bulk-instances

AWS EC2 instance attributes and prices, with their full history, from the bundle Infrawrench publishes at instances-bundles.infrawrench.com.

pip install infrawrench-bulk-instances
import os

from infrawrench_bulk_instances import download_aws_ec2_pricing_data

data = download_aws_ec2_pricing_data(token=os.environ.get("INFRAWRENCH_API_KEY"))

data.keys()  # ["m5.large", "t2.micro", ...]

m5 = data.get("m5.large")
assert m5 is not None
m5.attributes["vcpu"]  # "2"
m5.attributes_in("US East (N. Virginia)")  # with that region's overrides
next(
    p.hourly
    for p in m5.pricing.on_demand
    if p.region_code == "us-east-1" and p.operating_system == "Linux" and p.tenancy == "Shared"
    and p.pre_installed_sw == "NA" and p.capacitystatus == "Used"
)  # 0.096

m5.attributes_history  # every attribute change, oldest first
m5.pricing_history.reserved  # every reserved price change, oldest first

Any Infrawrench bearer credential works as token (an iwk_ API key, an agent credential or a WorkOS access token). It defaults to INFRAWRENCH_API_KEY. Failures raise AWSPricingDataError, whose status is the HTTP status, if there was a response. Requires Python 3.10 or later; no dependencies.

Caching

The bundle is downloaded xz-compressed (about 20 MB) and kept decompressed (about 210 MB) in ~/.infrawrench/aws_pricing_data (cache_path), so a cached load skips decompression. Each load asks the server which bundle is latest and downloads it only if it is not cached, deleting the older one. If the server cannot be reached, the newest cached bundle is used instead. Pass cache_pricing_data=False to always download and never touch the disk. The cache is shared with the other Infrawrench bulk-instances SDKs.

Loading decompresses and parses the whole bundle. Instances are decoded lazily: get only wraps the raw rows, and attributes, attributes_history, pricing and pricing_history each decode on first access and keep the result. The returned objects are shared between calls, so they are read-only: prices and changes are frozen dataclasses, sequences are tuples and mappings are read-only views (attributes_in returns a new dict).

Prices and regions

  • region is the AWS location name (US East (N. Virginia)), region_code its code (us-east-1) where the price list gives one, else None.
  • pricing holds only what is still offered. In pricing_history, a None hourly means the price stopped being offered at at.
  • Dates are timezone-aware UTC datetimes.
  • Instances AWS no longer lists are still in keys(), with deleted_at set and empty pricing.

Metadata

Release files for infrawrench-bulk-instances 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 infrawrench-bulk-instances 1.0.0
File Size Uploaded Provenance Actions
infrawrench_bulk_instances-1.0.0.tar.gz 8.4 kB With provenance Details for infrawrench_bulk_instances-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for infrawrench-bulk-instances 1.0.0
File Interpreter ABI Platform Actions
infrawrench_bulk_instances-1.0.0-py3-none-any.whl Python 3 none any Details for infrawrench_bulk_instances-1.0.0-py3-none-any.whl

Total release size: 18.6 kB

Release files / infrawrench_bulk_instances-1.0.0.tar.gz

Download URL infrawrench_bulk_instances-1.0.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8773592c1002d0e2d16d51358b4544678cd7be1ed71c90e48327067e2cbc7304
BLAKE2b-256 checksum
How to use checksums
a3b05dce9c55da2c5f3413f334549aa017716328781591df9c9a3f235c1c0180
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 29, 2026.

Transparency log

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

Download URL infrawrench_bulk_instances-1.0.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b27e44c61ca8a9e18e35f04d1cb3034d1dbf341a66b1c51255470c31d138f1aa
BLAKE2b-256 checksum
How to use checksums
2af6812b4d01d2551922afda8cc79c78c88fdc535731ab9f8e9992c25674fbc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 29, 2026.

Transparency log

Security for infrawrench-bulk-instances 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.

Full provenance

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

Select from 2 files

Attestation for infrawrench_bulk_instances-1.0.0.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 Oct 29, 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.

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