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

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.2
File Size Uploaded
pinned-0.15.2.tar.gz 160.1 kB Details

Built distribution (wheel)

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

Total release size: 265.6 kB

Release files / pinned-0.15.2.tar.gz

Download URL pinned-0.15.2.tar.gz
Size 160.1 kB
Tags Source
SHA-256 checksum
How to use checksums
94f212588e8f944a8843253ea60fe05baf146862c6dd0c2c485f06ac857c602b
BLAKE2b-256 checksum
How to use checksums
ddeaf9ce966473fc8bc7ac79ad37875626bfeb63b7aa02f8668e6062104cfa60
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 8, 2026.

Transparency log

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

Download URL pinned-0.15.2-py3-none-any.whl
Size 105.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac3541d24e49d89b753854d829641833143f8c81a6c6a8693bdbc856f3d5df80
BLAKE2b-256 checksum
How to use checksums
56cbd5163343923b6802627c050969ad534fd62ce06fea74350e91bd0939216c
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 8, 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.2 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