Skip to main content

atradio (Python SDK)

The official Python SDK for atradio.fm. It's a thin UniFFI binding to the shared Rust core (atradio-sdk), so the auth / record / reconcile logic is byte-for-byte the same as the Rust, Go, and TypeScript SDKs.

Setup (uv)

The native library + generated module are build artifacts. Build them once, then use uv:

cd sdk/python
./build.sh              # cargo build + uniffi-bindgen + copy the native lib
uv run examples/smoke.py

Interactive console (IPython)

Play with the SDK in a REPL. av (an unauthenticated AppView) plus AppView, Agent, and favorite_rkey are pre-imported:

uv run --group console console.py
In [1]: av.recent_stations(3)
In [2]: favorite_rkey("rb:...")

Usage

from atradio import AppView, Agent, favorite_rkey

# Reads — unauthenticated.
av = AppView()
for s in av.recent_stations(10):
    print(s.station.name)

# Writes — app-password login (persists a session file).
agent = Agent.login_password("session.json", "alice.bsky.social", "app-password")
agent.favorite(station)      # idempotent — deterministic record key
agent.set_play_status(station)

# The favorite record key matches every other atradio SDK.
favorite_rkey("rb:...")      # 16-char hex

Layout

  • crates/atradio-uniffi (Rust) — the UniFFI core: a sync facade over the async atradio-sdk, driving a tokio runtime.
  • build.sh regenerates src/atradio/atradio_uniffi.py + the native library.
  • src/atradio/__init__.py re-exports the generated bindings as the atradio package.

Metadata

Release files for atradio 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 atradio 0.1.0
File Size Uploaded
atradio-0.1.0.tar.gz 24.7 kB Details

Built distribution (wheel)

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

Total release size: 39.7 kB

Release files / atradio-0.1.0.tar.gz

Download URL atradio-0.1.0.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4fa8a89b789ee363b15b70ee93d9142fbf87af19e61633d4d1cc909874167132
BLAKE2b-256 checksum
How to use checksums
c816a31473e1049b2f4e285f80e4b59796362be90bae6543eb2d447367c3c209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

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

Download URL atradio-0.1.0-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de1259b9b692e7ef5756dcbf50e66aa75708e57b90d5d943a574e94db2c1170f
BLAKE2b-256 checksum
How to use checksums
f52c874d64d2809e746df6dcc9511741ceeba29ad836aa3f925c867be95f6a41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

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