Skip to main content

A Python client SDK for the PewHits radio server

Project description

PewHits Radio SDK

A lightweight, async Python client SDK for interacting with PewHits Radio's WebSocket-based backend. This library enables applications and bots to fetch, queue, skip, block, and play songs seamlessly, using a request-response WebSocket pattern.


📦 Installation

Install directly from PyPI:

pip install pewhits-client-sdk==0.7

🚀 What's New in v0.1

  • README.md added — now you know how to use it 😄
  • 🎯 Cleaned up and documented all data models
  • 🔄 Structured request/response pattern with rid support
  • 🧠 Strong typing and cleaner logic
  • 🧹 Ready for production bots and clients

🎵 Features

  • Get now playing song
  • See next coming song
  • View full queue
  • Skip current song
  • Block/Unblock tracks
  • Remove songs from queue
  • Play any Spotify track
  • Auto keepalive ping support
  • Full radio reload request

🧹 Request/Response Models

🔁 Standard Requests

Request Class Response Returned
NowPlayingRequest NowPlayingResponse
NextComingRequest NextComingResponse
QueueRequest QueueResponse
BlocklistRequest BlocklistResponse
SkipSongRequest SkipSongResponse
BlockSongRequest BlockSongResponse
UnblockSongRequest UnblockSongResponse
RemoveSongRequest RemoveSongResponse
PlaySongRequest PlaySongResponse
ReloadAllRequest ReloadAllResponse
KeepaliveRequest KeepaliveResponse

📦 Data Models

  • NowPlayingSong
  • NextComingSong
  • QueueSong
  • BlockedSongs

These are returned inside each respective .data field.


🧪 Development

Want to run and test locally?

git clone https://github.com/chitranshsh/pewhits-client-sdk.git
cd pewhits-client-sdk
pip install -e .

Or if you're using poetry:

poetry install
poetry run pytest

🤝 Contributing

All improvements are welcome 💡 Feel free to open issues or submit a PR!


📄 License

License © 2025 Chitransh Shrivastava


🌐 Links


💖 Author

Chitransh Shrivastava CS B.Tech + Open Source Builder 💻 Find me on GitHub


Made with love and music 🎶💫

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pewhits_client_sdk-0.7.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pewhits_client_sdk-0.7.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pewhits_client_sdk-0.7.0.tar.gz.

File metadata

  • Download URL: pewhits_client_sdk-0.7.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for pewhits_client_sdk-0.7.0.tar.gz
Algorithm Hash digest
SHA256 f5c93cbfdf826d699e80098cc5c5b936f3356e3cdeffd2f6a8f89481b9e71969
MD5 018f49a4a791c47fb40cdc699fca7b9f
BLAKE2b-256 e0f36a179a8daef892db22f49e41f3b70ae3128fcac66baa29bc6a4942d7aa21

See more details on using hashes here.

File details

Details for the file pewhits_client_sdk-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pewhits_client_sdk-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edee2efc5eda92e0c3a423aea60b01c055ab597df9d0c83d8cbc937effe01de9
MD5 1b73ec1da0a3b594038764ec50efe192
BLAKE2b-256 48b665934d6a3a4e63503d2b9a1dcec385ee7433e0492f26981225ccd21d31f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page