How aran404/spotapi works
SpotAPI is an async Python library and terminal toolkit for Spotify’s public catalogue and authenticated account/player features. The main workflow is a caller’s search or metadata request through the catalogue API and query/transport layers to Spotify, returning typed results. Separate branches cover account and playlist management, player control, terminal discovery and Connect, and the Studio explorer. The README documents these product capabilities; relationships between unsampled feature modules are omitted where source excerpts do not establish their wiring.
Main entry points: catalogue.py Catalogue · session.py Auth session · query.py Query client · player.py Player control
Components 24
Public catalogue
- Public API
spotapi/public.py - Catalogue
spotapi/catalogue.py - Typed search results
spotapi/models/search.py - Catalogue models
spotapi/models/catalogue - Discovery data
spotapi/models/discovery.py
Sessions and transport
- Query client
spotapi/query.py - Auth session
spotapi/session.py - Async client
spotapi/client.py - HTTP transport
spotapi/connection/http.py - Spotify routes
spotapi/_protocol/routes.py
Account and playback
- Account APIs
spotapi/account.py - Playlist operations
spotapi/playlist.py - Player control
spotapi/player.py - Playback models
spotapi/models/playback.py
Terminal and desktop
- CLI
spotapi/cli.py - Discover explorer
spotapi/_demo/discover.py - Connect app
spotapi/_connect/app.py - Connect session
spotapi/_connect/session.py - Connect commands
spotapi/_connect/commands.py - Studio explorer
spotapi/_studio/service.py - Studio lyrics
spotapi/_studio/lyrics.py
Other components
- Python caller
- Terminal user
- Spotify services
Connections 31
- Python caller → Public API: calls
README.md - Python caller → Catalogue: searches
README.md - Public API → Catalogue: exposes
README.md - Catalogue → Query client: requests
spotapi/catalogue.py - Catalogue → Catalogue models: returns typed data
spotapi/catalogue.py - Catalogue → Typed search results: builds results
spotapi/catalogue.py - Catalogue → Discovery data: uses models
spotapi/catalogue.py - Typed search results → Catalogue models: groups entities
spotapi/models/search.py - Query client → Auth session: signs requests
spotapi/query.py - Query client → Async client: sends requests
spotapi/query.py - Auth session → Async client: owns client
spotapi/session.py - Async client → HTTP transport: delegates HTTP
spotapi/client.py - Query client → Spotify routes: uses routes
spotapi/query.py - HTTP transport → Spotify services: HTTP exchange
- Terminal user → CLI: runs commands
README.md - CLI → Catalogue: searches catalogue
README.md - Terminal user → Discover explorer: explores
README.md - Discover explorer → Catalogue: browses results
README.md - Terminal user → Connect app: controls player
README.md - Connect app → Connect commands: dispatches commands
spotapi/_connect/app.py - Connect app → Connect session: uses session
spotapi/_connect/app.py - Connect session → Catalogue: searches tracks
spotapi/_connect/session.py - Connect session → Player control: controls playback
spotapi/_connect/session.py - Player control → Playback models: returns state
README.md - Terminal user → Studio explorer: opens explorer
README.md - Studio explorer → Studio lyrics: uses lyrics
spotapi/_studio/service.py - Studio explorer → Catalogue: loads catalogue
README.md - Account APIs → Auth session: requires session
README.md - Playlist operations → Auth session: requires session
README.md - Player control → Auth session: requires session
README.md - Player control → Spotify services: controls existing player
README.md