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
- Get started: https://github.com/assistant-ui/harness-sdk/blob/main/apps/docs/app/docs/get-started/durable-host/page.mdx
- Guide: https://github.com/assistant-ui/harness-sdk/blob/main/apps/docs/app/docs/guides/pinned/authoring/page.mdx
- Reference: https://github.com/assistant-ui/harness-sdk/blob/main/apps/docs/app/docs/reference/pinned/page.mdx
- Spec: https://github.com/assistant-ui/harness-sdk/blob/main/apps/docs/app/docs/spec/pinboard-registry/page.mdx
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)
| File | Size | Uploaded | |
|---|---|---|---|
| pinned-0.15.1.tar.gz | 159.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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