Skip to main content

overlay-social (Python)

Read-only Python client for overlay.peck.to — the canonical peck social overlay on BSV. Identity resolution, profiles, handles, feed, threads, and overlay topic-state. Sync and async. The Python sibling of @overlay-social/sdk.

It is a pure read lens. It does not write, mint, pay, or federate — none of those exist on the live service. It speaks the REST facade that actually runs today.

Install

pip install overlay-social

Use

from overlay_social import create_overlay_client

overlay = create_overlay_client()  # https://overlay.peck.to

# Overlay topic-state (counts + state-roots)
state = overlay.get_state()
for t in state.topics:
    print(t.topic, t.count, t.state_root[:10])

# Batch-resolve feed authors to canonical ProfileToken identity.
# Pass P2PKH base58 in `addresses`, pubkey-hex subjects in `pubkeys`.
# ONE round-trip per feed page — never per row.
ids = overlay.resolve_identities(addresses=["1Abc...", "1Def..."])
for key, ident in ids.items():
    print(key, ident.handle, ident.display_name, ident.avatar_ref)

# Single lookups return None when there's no canonical token (never raise).
profile = overlay.get_profile(subject="02...")        # ProfileRow | None
who     = overlay.resolve_handle("thomas")             # HandleResolution | None
bundle  = overlay.get_identity("02...")                # IdentityBundle | None

Async (FastAPI / Starlette / FastHTML)

from overlay_social import create_async_overlay_client

async with create_async_overlay_client() as overlay:
    feed = await overlay.get_feed(limit=20, type="post")
    ids = await overlay.resolve_identities(
        addresses=[row.get("author") for row in feed.data]
    )

Error semantics

Mirrors the overlay's load-bearing role for other apps:

  • resolve_identities returns {} on any error and omits keys without a canonical ProfileToken (ghost authors). A feed UI can enrich defensively and never break.
  • Single-item lookups (get_identity, resolve_handle, get_profile, get_post) return None for missing/invalid (404/400/empty).
  • Only get_feed and get_state raise OverlayError on a genuine 5xx / network failure.
  • Every request has a hard timeout (default 8s).

Endpoints used

GET /state, POST /v1/identities/resolve, GET /identity/:pubkey, GET /resolve/:handle, GET /v1/bio/profile, GET /v1/feed, GET /v1/post/:txid, GET /v1/thread/:txid. WhatsOnChain is never called.

License

Open BSV License v5 — usable only on the Bitcoin SV blockchain, by design.

Metadata

Release files for overlay-social 0.1.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 overlay-social 0.1.0
File Size Uploaded Provenance
overlay_social-0.1.0.tar.gz 7.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for overlay-social 0.1.0
File Interpreter ABI Platform
overlay_social-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.4 kB

Release files / overlay_social-0.1.0.tar.gz

Download URL overlay_social-0.1.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c30235f527c54a9ae5d183a55b536adf58a3c26bf80a802672334f03d112b0cd
BLAKE2b-256 checksum
How to use checksums
12bee1122f43dad734546a6334759bc371b51c5b1446841698fdc12421d8f5d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / overlay_social-0.1.0-py3-none-any.whl

Download URL overlay_social-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b232100091543060aff6483d525b75101b93f2a2422fe40ed8c3979ca5767860
BLAKE2b-256 checksum
How to use checksums
03d3d953caec5763f1a6cc3ea0cd5e80130da825de5f98275af780d1c1a800f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for overlay-social 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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