Skip to main content

flopscope-server

PyPI version Python 3.10+ License: MIT

Server-side runtime for the flopscope client-server architecture.

flopscope-server runs the heavy NumPy-backed flopscope library on behalf of remote flopscope-client processes that connect over ZMQ + msgpack. Use it when you want to isolate untrusted or sandboxed code (typically participant submissions in the ARC Whitebox Estimation Challenge) from the actual computation environment.

When to install this

You want this on the server side of a client-server flopscope deployment. It pulls in flopscope, numpy, pyzmq, and msgpack:

pip install flopscope-server

Equivalent extra on the main flopscope distribution (installs both at the same exact version):

pip install "flopscope[server]"

Quick start

Launch the server

# Over a UNIX domain socket (recommended for local / single-host deployments)
python -m flopscope_server --url ipc:///tmp/flopscope.sock

# Or over TCP
python -m flopscope_server --url tcp://127.0.0.1:15555

Connect a client

In a separate process (typically a sandboxed container) that has flopscope-client installed:

export FLOPSCOPE_SERVER_URL=ipc:///tmp/flopscope.sock
import flopscope as flops
import flopscope.numpy as fnp

with flops.BudgetContext(flop_budget=1_000_000):
    a = fnp.array([1.0, 2.0, 3.0])
    b = fnp.array([4.0, 5.0, 6.0])
    fnp.add(a, b)
    flops.budget_summary()

The client's first request performs a version handshake with the server; mismatched flopscope versions raise ConnectionError with both versions in the message. Keep flopscope-server and flopscope-client on the same release.

Architecture overview

┌─────────────────────────────┐         ZMQ + msgpack         ┌──────────────────────────────┐
│  flopscope-client process   │ ───────────────────────────▶  │  flopscope-server process    │
│  (sandbox; no numpy)        │                                │  (full flopscope + numpy)    │
│  `import flopscope as flops`│ ◀───────────────────────────  │  Executes ops, tracks budget │
└─────────────────────────────┘                                └──────────────────────────────┘

Every counted operation (matmul, einsum, FFT, reductions, …) is dispatched to the server, executed against the real library, and the result + remaining budget streamed back. The client never sees numpy.

Related

  • flopscope — the NumPy-backed library hosted by this server
  • flopscope-client — the lightweight proxy clients use to talk to a flopscope-server
  • Documentation — full guides including client/server architecture and Docker recipes
  • GitHub — source, CHANGELOG, contributor guide

License

MIT

Metadata

Release files for flopscope-server 0.10.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 flopscope-server 0.10.0
File Size Uploaded
flopscope_server-0.10.0.tar.gz 91.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flopscope-server 0.10.0
File Interpreter ABI Platform
flopscope_server-0.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 122.3 kB

Release files / flopscope_server-0.10.0.tar.gz

Download URL flopscope_server-0.10.0.tar.gz
Size 91.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d22f3a1e9ecab4cef460060958af1f376aa7f27dbf6f369e82907bf705d70755
BLAKE2b-256 checksum
How to use checksums
4a6d8c2ace164252da8fd31c2d1e674237f0b78d11899064b88908b0f8e1719b
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 Jul 30, 2026.

Transparency log

Release files / flopscope_server-0.10.0-py3-none-any.whl

Download URL flopscope_server-0.10.0-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
516cfc6d7734f36a98e522ceaf18527bb4037c0575b88ffe1fc487b575819258
BLAKE2b-256 checksum
How to use checksums
9bfac982204de98e59f5caabb8441b48290dfebde2f83c7a69a1539040667ed6
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 Jul 30, 2026.

Transparency log
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