Skip to main content

flopsindex — Python SDK

PyPI release mirror. Source of truth: flopsindex monorepo (sdk/python/). Refresh with flopsindex/scripts/sync-publish.ps1 before publishing.

PyPI version PyPI - Python Version PyPI Downloads License: Apache 2.0 Live API Spec Docs

See alsodocs & source · MCP server flopsindex-mcp · schema · Public access overview

pip install flopsindex

Python client for the FLOPS public API — delayed public GPU compute reference rates (indicative, not for settlement). Stdlib only, no dependencies.

Public access

This package exposes the public FLOPS index surface only: citeable reference rates with verify and permalink URLs. Index construction methodology is not published in this repository — see flopsindex.com and the public access overview.

Access What you get How (this package)
Anonymous (default) Delayed public price (~6h grid; indicative, not for settlement) for the FLOPS family (FLOPS-SPOT, FLOPS-OD, FLOPS-DEPIN). Client() with no API key
Keyed Same endpoints at real-time, full precision. FLOPSINDEX_API_KEY or Client(api_key=...)X-FLOPS-Api-Key
Partner Higher fidelity, expanded coverage, and additional detail beyond the public delayed surface. team@flopsindex.com

If you need more than delayed public rates — e.g. production-grade latency, broader index families, or deeper commercial terms — reach out to team@flopsindex.com to discuss partner options.

30-second example

from flopsindex import Client

c = Client()  # no key required

print(c.price("FLOPS-H100-OD"))
# {'index_id': 'FLOPS-H100-OD', 'value': 2.45, 'unit': 'USD/GPU-hr',
#  'as_of': '2026-07-13T12:00:00+00:00',  # delayed to a ~6h grid (00/06/12/18 UTC)
#  'delayed': True, 'data_tier': 'LIVE', 'confidence': 'HIGH',
#  'change_24h': 'FLAT',  # banded: UP | FLAT | DOWN
#  'disclaimer': 'indicative reference; not for settlement',
#  'methodology_url': '.../i/FLOPS-H100-OD/methodology',
#  'verify_url': '...', 'citation_url': '...', 'permalink': '...', 'upgrade': '...'}

print(c.search("h100 spot"))
print(c.list_indices())

Public surface

All methods work without an API key.

Method Returns
price(index_id) latest public price (delayed for anon)
search(q) NL → slug results
list_indices() / catalog() public catalog (/v2/catalog/public)
verify(id, value) does the value match our tick?
verify_handshake(id, value) defensive citation check (never raises)

API key (optional — upgrades delayed → real-time)

No key is required. If you have one:

export FLOPSINDEX_API_KEY="flops_xxxxxxxxx"

Or pass it directly:

c = Client(api_key="flops_xxxxxxxxx")

The SDK forwards it as X-FLOPS-Api-Key on every request, which upgrades the delayed public price to real-time, full precision server-side. See Public access for partner-tier options.

Citation

Price, verify, cite:

tick = c.price("FLOPS-H100-OD")
check = c.verify_handshake("FLOPS-H100-OD", tick["value"])
if check.get("verified"):
    # use check["source_url"] in your citation
    ...

verify_handshake won't raise on HTTP errors — it returns {ok: false, reason, ...} instead. Use verify() if you want exceptions.

MCP

For Claude, Cursor, Windsurf, etc. use the separate package: pip install flopsindex-mcp.

Naming

  • FLOPS-{model}-{OD|SPOT|DEPIN} — GPU rental indices (the only family on the public surface)

Use c.search() if you don't know the exact slug.

Errors

from flopsindex import Client, FlopsNotFoundError, FlopsAuthError

c = Client()
try:
    tick = c.price("FLOPS-UNKNOWN-OD")
except FlopsNotFoundError as e:
    print(f"index not found: {e.detail}")

Hierarchy: FlopsErrorFlopsAuthError / FlopsNotFoundError / FlopsRateLimitError / FlopsServerError. All errors carry .status_code and .detail.

License

Apache License 2.0 — see LICENSE and NOTICE.

Download files

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

Source Distribution

flopsindex-0.8.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

flopsindex-0.8.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file flopsindex-0.8.2.tar.gz.

File metadata

  • Download URL: flopsindex-0.8.2.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flopsindex-0.8.2.tar.gz
Algorithm Hash digest
SHA256 40af56f028716af7c195d1d87827ea17245ae0216e654f96211037a48f78688d
MD5 4bffac6625085c8e0ad81d40278d13af
BLAKE2b-256 0ddaa279b2155dade062d0f5915dd50b0b6dcfbb9768b2d298c226b2bf1ad5dd

See more details on using hashes here.

File details

Details for the file flopsindex-0.8.2-py3-none-any.whl.

File metadata

  • Download URL: flopsindex-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flopsindex-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 389261fdd51d31589a49e214fee63a460080f5f8a91a443c05537cf7432a69c1
MD5 0fc20e3b3334da6a894251522945fe0c
BLAKE2b-256 529dd371eaa0be491ddceee63ac4cbb92a006bd3f663990b673251783a84fc83

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.3

2 files

This release

0.8.2 This release

2 files

0.8.1

2 files

0.8.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