Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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.16.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.16.0
File Size Uploaded Provenance Actions
pinned-0.16.0.tar.gz 162.8 kB With provenance Details for pinned-0.16.0.tar.gz

Built distribution (wheel)

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

Total release size: 269.0 kB

Release files / pinned-0.16.0.tar.gz

Download URL pinned-0.16.0.tar.gz
Size 162.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7931ea8bad9b13421eeaa8132b2f8f12d83f03dd484466d163c0253288fbd49c
BLAKE2b-256 checksum
How to use checksums
ce909acaabb6556da1befa9979bb93946d8a05c122f632d79699583f06f09b2f
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 Oct 19, 2026.

Transparency log

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

Download URL pinned-0.16.0-py3-none-any.whl
Size 106.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
143fa99e24b1a6958443d6efbb13d33f0f1f3032f77885e625c65127f7f86f68
BLAKE2b-256 checksum
How to use checksums
365771d0abc33fc352340c59f5886fe27159bde99b2693e76b5904d57a3483d3
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 Oct 19, 2026.

Transparency log

Security for pinned 0.16.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pinned-0.16.0.tar.gz

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 Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

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