adventuresinodyssey
Unofficial Python clients for the Adventures in Odyssey Club API.
Look up episodes, albums, characters, cast and crew, themes, the radio schedule and search results. With a Club account you can also manage playlists, bookmarks, comments and listening progress.
Installation
pip install adventuresinodyssey
If you plan to log in with ClubClient or AsyncClubClient, also install the browser Playwright uses for login (one-time setup):
playwright install chromium
Requires Python 3.8+.
Which client do I need?
| Client | Login? | Use it for |
|---|---|---|
AIOClient |
No | Anything the public site shows: metadata, promos, radio episodes, search, characters, albums |
ClubClient |
Yes | Everything in AIOClient, plus full episodes, playlists, bookmarks, comments, badges and progress |
AsyncAIOClient |
No | AIOClient for asyncio code |
AsyncClubClient |
Yes | ClubClient for asyncio code |
Quick start
No account needed
import random
from adventuresinodyssey import AIOClient
client = AIOClient()
episodes = client.cache_episodes() # every episode, across all albums
episode = random.choice(episodes)
print(episode["short_name"]) # e.g. "#125: All's Well With Boswell"
print("https://app.adventuresinodyssey.com/content/" + episode["id"])
With a Club account
Keep your credentials out of your code. Put them in a .env file next to your script (and add it to .gitignore):
AIO_EMAIL=you@example.com
AIO_PASSWORD=your_password
AIO_VIEWER_ID=a3J... # optional, see the ClubClient docs
AIO_PIN=1234 # optional, only if the profile has a PIN
Then load them with python-dotenv (pip install python-dotenv):
import os
from dotenv import load_dotenv
from adventuresinodyssey import ClubClient
load_dotenv()
client = ClubClient(
email=os.getenv("AIO_EMAIL"),
password=os.getenv("AIO_PASSWORD"),
viewer_id=os.getenv("AIO_VIEWER_ID"),
pin=os.getenv("AIO_PIN"),
)
# Make a playlist out of every season soundtrack
soundtracks = []
collections = client.fetch_content_groupings(grouping_type="Collection", page_size=100)
for group in collections["contentGroupings"]:
if "Season" in group["name"]:
soundtracks += [item["id"] for item in group["contentList"]]
playlist = client.create_playlist(name="Soundtracks", content_ids=soundtracks)
playlist_id = playlist["contentGroupings"][0]["id"]
print("https://app.adventuresinodyssey.com/playlists/" + playlist_id)
You don't need to call login(). The client logs in on the first request and saves the session to club_session.json, so later runs skip the browser login. Treat club_session.json like a password: don't commit or share it.
Async
import asyncio
from adventuresinodyssey import AsyncAIOClient
async def main():
async with AsyncAIOClient() as client:
radio = await client.fetch_radio(page_size=3)
for episode in radio["results"]:
print(episode["relative_air_day"], "-", episode["short_name"])
asyncio.run(main())
Documentation
- Overview and concepts: start here
- Function reference: every method, and which client has it
- Example programs
For streaming episodes, I recommend mpv (pip install mpv for the Python bindings).
Acknowledgements
Thanks to Droopcat for figuring out the Club's authentication flow.
Metadata
Release files for adventuresinodyssey 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| adventuresinodyssey-0.2.7.tar.gz | 47.9 kB | Without provenance | Details for adventuresinodyssey-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adventuresinodyssey-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for adventuresinodyssey-0.2.7-py3-none-any.whl |
Total release size: 96.7 kB
Release files / adventuresinodyssey-0.2.7.tar.gz
| Download URL | adventuresinodyssey-0.2.7.tar.gz |
|---|---|
| Size | 47.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dcd6a1cf724d1885863063654199188d0a17150914f40906e25868ea62a7db91
|
|
BLAKE2b-256 checksum How to use checksums |
07a1570d3953768bd91f78f666e08f2d5920e54bb46b4235574b578a1657415b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / adventuresinodyssey-0.2.7-py3-none-any.whl
| Download URL | adventuresinodyssey-0.2.7-py3-none-any.whl |
|---|---|
| Size | 48.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
947823a6106f2e1f8e8e0993957cb5c2f37576602e19471039d227b51689f28b
|
|
BLAKE2b-256 checksum How to use checksums |
08728e2d77bfd5fa17340c81c678ca2d4becec3707ba6a9a53e7778305f11fc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for adventuresinodyssey 0.2.7
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.