Andesite client for Python
Project description
andesite.py
A Python client library for Andesite. andesite.py tries to be as flexible as possible while still providing the same, consistent API. The library comes with built-in support for discord.py, but it can be used with any library of your choice.
The goodies
- Pythonic, fully typed API including all Andesite "entities"
- Client pools with balancing and even state migration. If one node goes down its players are seamlessly migrated to another one.
- Custom state handlers. andesite.py doesn't force you to use its state manager, not even for the client pools. It provides you with a solid in-memory one, but you can swap it out however you want.
- Future-proof design so that if the library becomes outdated it still remains usable.
Usage
The following is a small example of how to use andesite.py. For more in-depth examples and information, please refer to the documentation.
import asyncio
import andesite
client = andesite.create_andesite_client(
"http://localhost:5000",
"ws://localhost:5000/websocket",
None,
549905730099216384,
)
async def main() -> None:
result = await client.search_tracks("your favourite song")
track_info = result.get_selected_track()
# notice that we haven't called any sort of connect method. You can
# of course manually connect the client, but if you don't that's no
# biggie because andesite.py will do it for you.
await client.play(track_info.track)
asyncio.run(main())
Documentation
You can find the documentation on the project's website. Click here to open the documentation.
You can also take a look at the examples directory for a reference.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
andesite.py-0.1.0.tar.gz
(48.1 kB
view hashes)
Built Distribution
Close
Hashes for andesite.py-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50dd6e6da6552e9e44043a8f6921f7b0918f149d13faba8b086bbd4ba49d097e |
|
MD5 | d3ee54c96bb21fdc4ba194bebde9c87a |
|
BLAKE2b-256 | e8694040aa127a0c13333722819dd38c3955175b32ef731ea7baad4dffa20f4b |