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

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.1
File Size Uploaded
pinned-0.15.1.tar.gz 159.9 kB Details

Built distribution (wheel)

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

Total release size: 265.4 kB

Release files / pinned-0.15.1.tar.gz

Download URL pinned-0.15.1.tar.gz
Size 159.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a474ab59e05f59f7926fbb7e4ceb1d05a3d3bbed341b00a7fc46d7d589db3ce4
BLAKE2b-256 checksum
How to use checksums
b11f80ffbd79c95302513a736c2fea8fddab4d945efea6ba5de026f94c30ebf4
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.1-py3-none-any.whl

Download URL pinned-0.15.1-py3-none-any.whl
Size 105.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
149f0d07bc4091fa03187a47fbda0705a1a9929bc267f41113071e21c05b45be
BLAKE2b-256 checksum
How to use checksums
e58ab10f07a97d04a206cc902dcd1f208853c5ed705e6d12b747afdc334a04db
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.1 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