Skip to main content

pinned

Durable objects for Python: one live instance of your class per id across a fleet, activated on the first request, with its own HTTP surface. Part of harness-sdk, with statewire and harness-sdk.

Install

uv add pinned

Extras: uv add "pinned[postgres]", uv add "pinned[psutil]".

Use

from fastapi import FastAPI
from pinned import PinnedAPI, PinnedHost, PinnedWorker, route
from pinned.durability import MemoryStateStore

class Counter(PinnedAPI):
    async def lifespan(self):
        self.count = 0
        yield

    @route.post("/increment")
    async def increment(self):
        self.count += 1
        return {"id": self.id, "count": self.count}

worker = PinnedWorker(state_store=MemoryStateStore())
app = FastAPI()
app.include_router(worker)
app.include_router(PinnedHost(Counter, worker=worker, namespace="/counters"))

Docs

Metadata

Release files for pinned 0.15.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 pinned 0.15.0
File Size Uploaded
pinned-0.15.0.tar.gz 156.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pinned 0.15.0
File Interpreter ABI Platform
pinned-0.15.0-py3-none-any.whl Python 3 none any Details

Total release size: 261.1 kB

Release files / pinned-0.15.0.tar.gz

Download URL pinned-0.15.0.tar.gz
Size 156.8 kB
Tags Source
SHA-256 checksum
How to use checksums
743af111a88667355399e6fe9d5ed99e0bd7080b0f6e434a05ce9425df312ec5
BLAKE2b-256 checksum
How to use checksums
528c637364293d57d56f475799c3d90cd5da28743f3fc456f9f5b02b179d9391
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 Sep 4, 2026.

Transparency log

Release files / pinned-0.15.0-py3-none-any.whl

Download URL pinned-0.15.0-py3-none-any.whl
Size 104.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c0791d0a890772d72b7187d2d5efe9d1ebf7042db55b2fbb7f4cb74dd02806b
BLAKE2b-256 checksum
How to use checksums
e967f8a224b94497258384301560f5388a786f2daa820d9816f12fa1bac1d398
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 Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

0.15.5

2 release files

0.15.4

2 release files

This release

0.15.0 This release

2 release files

0.14.7

2 release files

0.14.6

2 release files

0.14.5

2 release files

0.14.4

2 release files

0.14.3

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release 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