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

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.2.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.2.0.tar.gz (10.4 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.2.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flopsindex_partner-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 fb5dc95db301d3a8fe4b6a4affb6de5873ea47555de7e402b6187a78680c4fee
MD5 af1f8cdce342e88223566b7d13293158
BLAKE2b-256 7cb69857ce780d8899f57507c8395920d6e70ed59d1735606c7893b8c3c6204e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flopsindex_partner-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9424d3b3f92f2308cba23524b0a39a1df26f44cd5ff0f8129929a3ef7dff79a1
MD5 6abe0efc8dfe2b436e803eabe4bd21cb
BLAKE2b-256 b250131fe68f4001f997cf869dbd0f25ccf9624bb03d452470ecb0e1f1c41374

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