Skip to content

Initial sonilo Python SDK - #1

Merged
spencer-zqian merged 9 commits into
mainfrom
feat/initial-sdk
Jul 9, 2026
Merged

Initial sonilo Python SDK#1
spencer-zqian merged 9 commits into
mainfrom
feat/initial-sdk

Conversation

@spencer-zqian

Copy link
Copy Markdown
Contributor

Summary

  • Hand-written httpx-based Python client for the Sonilo public API
  • Mirrored sync (Sonilo) and async (AsyncSonilo) surfaces sharing request builders and NDJSON parsing
  • text_to_music / video_to_music with buffered generate() (returns Track) and stream() (event dicts, base64 audio decoded)
  • Path/bytes/file-like video uploads; video XOR video_url validation
  • Typed error hierarchy mapped from HTTP statuses and mid-stream error events
  • account.services() / account.usage()
  • CI (3.9 + 3.12) + manual publish workflow (publish NOT triggered; repo stays private until first release)

Spec: sonilo-api-dashboard docs/superpowers/specs/2026-07-08-sonilo-sdk-design.md

Test plan

  • pytest (unit, respx-mocked)
  • python -m build + wheel smoke-install
  • Manual smoke: SONILO_API_KEY=... python examples/generate.py "lofi" 10

@spencer-zqian
spencer-zqian merged commit 908800f into main Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant