Skip to main content

Partner-tier write SDK for the FLOPS Compute Intelligence Platform — submit fleet / SMPI / CLRI data. Companion to the public-read SDK at https://pypi.org/project/flopsindex/.

Project description

flopsindex-partner — partner write SDK

PyPI version PyPI - Python Version PyPI Downloads Live API Spec Docs

See also — full docs docs.flopsindex.com · become a contributor docs.flopsindex.com/become-a-contributor · public read SDK flopsindex · MCP server flopsindex-mcp (v0.6.0, mcp-publisher ready) · spec schema.flopsindex.com · adopters schema.flopsindex.com/adopters

pip install flopsindex-partner

Authenticated write-side SDK for contributing partners (Modular, the lender-wave anchors, future fleet operators) submitting fleet / SMPI / CLRI data into the FLOPS Compute Intelligence Platform.

For the read-side (price / verify / catalog / methodology / timeseries / compute_margin / spread) install the companion package flopsindex — different audience, different brand, no API key required for the public surface.

30-second example

from flopsindex_partner import FLOPSClient

c = FLOPSClient(api_key="flops_xxxxxxxxx")

# Weekly fleet snapshot
c.submit_weekly({
    "partner_id": "modular",
    "as_of":      "2026-05-19T00:00:00Z",
    "gpus":       [{"sku": "h100_sxm5", "region": "us_east", "count": 128}, ...],
})

# Single-machine pricing index event
c.submit_smpi({
    "partner_id": "modular",
    "sku":        "h100_sxm5",
    "region":     "us_east",
    "price_usd":  2.42,
    "tier":       "on_demand",
    "ts":         "2026-05-19T22:00:00Z",
})

# CLRI lease-rate submission
c.submit_clri({
    "partner_id":      "modular",
    "sku":             "h100_sxm5",
    "tenor":           "P36M",
    "implied_rate_pct": 11.4,
    "as_of":           "2026-05-19T00:00:00Z",
})

Async surface

Every method has an a-prefixed async sibling:

import asyncio
from flopsindex_partner import FLOPSClient

async def main():
    async with FLOPSClient(api_key="...") as c:
        await c.asubmit_smpi({...})

asyncio.run(main())

Renamed from flops-client (2026-05-19)

This package was previously published as flops-client. Old imports continue to work but emit DeprecationWarning:

# OLD — deprecated, still works
from flops_client import FLOPSClient

# NEW — canonical
from flopsindex_partner import FLOPSClient

The PyPI distribution name also changed (flops-clientflopsindex-partner). Update your requirements.txt:

- flops-client==0.1.0
+ flopsindex-partner>=0.6.0

The legacy flops-client distribution on PyPI will be marked deprecated in a follow-up release; it will continue to install but won't receive updates. The recommended deadline for migration is 2026-12-31.

Authentication

API keys are issued by FLOPS partner ops. Email partners@flopsindex.com to onboard. Once issued:

export FLOPS_API_KEY="flops_xxxxxxxxx"
import os
from flopsindex_partner import FLOPSClient

c = FLOPSClient(api_key=os.environ["FLOPS_API_KEY"])

Submission contracts

The schemas for submit_weekly / submit_smpi / submit_clri live in the Submission Guide (latest at https://app.flopsindex.com/v1/methodology/submission-guide). Each method returns the server's receipt envelope:

result = c.submit_smpi({...})
# {'receipt_id': '...', 'received_at': '...', 'methodology_version': '...',
#  'k_anon_floor_met': True, 'inputs_hash': 'sha256:...'}

Hold onto receipt_id + inputs_hash — they're the audit trail.

Errors

FLOPSClientError is raised on non-retryable 4xx + exhausted 5xx retries. The SDK retries 429/500/502/503/504 up to 3 times with exponential backoff before surfacing.

from flopsindex_partner import FLOPSClient, FLOPSClientError

try:
    c.submit_smpi({...})
except FLOPSClientError as e:
    print(f"HTTP {e.status_code}: {e.detail}")

Optional metrics

If prometheus-client is installed (pip install flopsindex-partner[metrics]), the SDK emits:

Metric Labels
flops_sdk_submissions_total endpoint, status (ok / error / exhausted)
flops_sdk_request_seconds endpoint

Scrape via the standard Prometheus exporter.

Related

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

flopsindex_partner-0.6.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

flopsindex_partner-0.6.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file flopsindex_partner-0.6.0.tar.gz.

File metadata

  • Download URL: flopsindex_partner-0.6.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for flopsindex_partner-0.6.0.tar.gz
Algorithm Hash digest
SHA256 163014bc822f6d4dc9d6f8ee26e7bd17621e47ca94769e8b68c1c96d4972a7d2
MD5 59006fdee1937959278517f08904ebf4
BLAKE2b-256 84f19414d4889a027fffe009f91870980e2126de0d079d0179edc65d1af1dee3

See more details on using hashes here.

File details

Details for the file flopsindex_partner-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flopsindex_partner-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40ab2318078ff325a4b39468c766cf783eac7ada92a50dd6447ddebf0b2e2fcf
MD5 965f18b7cba7180bc5c8cdadbea03558
BLAKE2b-256 2b149bb9caff43e21f71505516b2a723277c532e85b124d570dca507657e8ad8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page