⚠️ This library is on lifeline support and I am looking for a new maintainer. Please DM me if you are interested.
Songbird-Py
Songbird bindings for python. The goal is to provide an easy to use alternitive to Lavalink. Its written with rust-bindings to Songbird.
Dependencies
This library requires Opus to be installed. ffmpeg functions also require FFmpeg to be installed.
:warning: The static-ffmpeg package on pypi does not work
Building Source Dist
If you are not on windows, macos, or linux x86_64 or need to use a version of python different than 3.8-3.10 you will need to build the source dist. The only change to the installation process is that Rust will need to be installed before installing from pip.
Playing a Song
Once you are connected to a channel, playing music is extremely easy.
from songbird import ytdl
# `voice` was created from a connection to the gateway.
track_handle = await voice.play_source(await ytdl("https://www.youtube.com/watch?v=r25MAkzkTF4"))
await sleep(5)
# Doesn't need to be awaited!
track_handle.pause()
await sleep(5)
track_handle.play()
Supported Libraries
Hikari and Pincer are currently the only supported libraries. See the examples directory for more information.
Using with your own Gateway
from asyncio import run
from songbird import Driver
async def main():
voice = await Driver.create()
# `server` is the server payload from the gateway.
# `state` is the voice state payload from the gateway.
await voice.connect(
token=server.token,
endpoint=server.endpoint,
session_id=state.session_id,
guild_id=server.guild_id,
channel_id=state.channel_id,
user_id=state.user_id
)
run(main())
Contributing
Pyo3 asyncio is used with tokio.
Dependencies
Maturin should be installed though pip. This is used to build the Rust code to a python lib.
Run command maturin develop when changes are made to the Rust src.
pyo3 asyncio docs You can also look at the async secion of the pyo3 docs.
Songbird
Its a good idea to install all the dependencies.
Goal of the project
Create API for songbird driver and everything that is needed with it it.
Metadata
Release files for songbird-py 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| songbird_py-0.1.9.tar.gz | 130.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| songbird_py-0.1.9-cp310-none-win_amd64.whl | CPython 3.10 | none | Windows x86-64 | Details |
| songbird_py-0.1.9-cp310-cp310-manylinux_2_34_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.34+ x86-64 | Details |
| songbird_py-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl | CPython 3.10 | CPython 3.10 | macOS 10.9+ x86-64 | Details |
| songbird_py-0.1.9-cp39-none-win_amd64.whl | CPython 3.9 | none | Windows x86-64 | Details |
| songbird_py-0.1.9-cp39-cp39-manylinux_2_34_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.34+ x86-64 | Details |
| songbird_py-0.1.9-cp39-cp39-macosx_10_9_x86_64.whl | CPython 3.9 | CPython 3.9 | macOS 10.9+ x86-64 | Details |
| songbird_py-0.1.9-cp38-none-win_amd64.whl | CPython 3.8 | none | Windows x86-64 | Details |
| songbird_py-0.1.9-cp38-cp38-manylinux_2_34_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.34+ x86-64 | Details |
| songbird_py-0.1.9-cp38-cp38-macosx_10_9_x86_64.whl | CPython 3.8 | CPython 3.8 | macOS 10.9+ x86-64 | Details |
Total release size: 29.9 MB
Release files / songbird_py-0.1.9.tar.gz
| Download URL | songbird_py-0.1.9.tar.gz |
|---|---|
| Size | 130.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6faa7293dae21126ffbc5b93f7aa8bc5f1398e8116336183b5932f18f05cecef
|
|
BLAKE2b-256 checksum How to use checksums |
e9d97ff3fada06c4f73e32ceb1aa6d7cb7b890691fb495316a7449b6bdf8e21b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp310-none-win_amd64.whl
| Download URL | songbird_py-0.1.9-cp310-none-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
283ed6d3e8fce060aeb1b97a63e8bf3ca607039491cb8558dfcf6aaa4546fc7c
|
|
BLAKE2b-256 checksum How to use checksums |
ec7b1d3839ec4a7451ca0d0c191bdcbb1fbf6b646c2916669c491a160279bed8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | songbird_py-0.1.9-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f498b4b1e73ae26dba12e37f3e0da6f175bbd9b504d26854995c10e24354f93
|
|
BLAKE2b-256 checksum How to use checksums |
5c9052e2f237c2a6f7279f9c012a09c44ee2f4d43f70e94fcb92db17f8b33015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | songbird_py-0.1.9-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
4cc24104eba0013e591c58f6eadf745056b1c0ca2a03baebe17b7988e368832e
|
|
BLAKE2b-256 checksum How to use checksums |
944d6f0a49af6cc839aeff15c719e0f5ae4fb719b7f7e8dea68327f0189f3ae0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp39-none-win_amd64.whl
| Download URL | songbird_py-0.1.9-cp39-none-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3a92864adc1559c05a8ddf6aedce43758440a740a07846178155c8e359edcd34
|
|
BLAKE2b-256 checksum How to use checksums |
4c0e324449d361b613577b53598502191b7d2b505ba0762d7775b45e90fc740c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp39-cp39-manylinux_2_34_x86_64.whl
| Download URL | songbird_py-0.1.9-cp39-cp39-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
05ddd55ee4e0803b14f067032fce6f0597086f8d552ad5545d076ec1f424df24
|
|
BLAKE2b-256 checksum How to use checksums |
d82a5ad3556303ba7b1bc7819eace04587888c6090d210c0eb589ff4ae96d0eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | songbird_py-0.1.9-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
1a4e3f08aa717c709df957776aa656feddf477a8fae7eb957c8069c425ad3cfe
|
|
BLAKE2b-256 checksum How to use checksums |
459ed9a4b7812b3c3c1cb5588559581a1a175609f0cc9e03cd2049cca0280264
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp38-none-win_amd64.whl
| Download URL | songbird_py-0.1.9-cp38-none-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
153c36acb3a101d94cbdaf5726fa9ab83f7f656fc315d7ea89c739b18261d3dd
|
|
BLAKE2b-256 checksum How to use checksums |
8b1bb4e2ed44517cc6a087eabf05945b782aec45e57a4c80a2d0a313c19800a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp38-cp38-manylinux_2_34_x86_64.whl
| Download URL | songbird_py-0.1.9-cp38-cp38-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.8 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
256d12f8ebbff3d9177ce7485c5acda8cb4ab0c34b808016d3c4f1885fea166a
|
|
BLAKE2b-256 checksum How to use checksums |
0b2106961ace76ecc77e377c2d683b6ac80ecd5276b3e17f47ea68c07e7f1db7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / songbird_py-0.1.9-cp38-cp38-macosx_10_9_x86_64.whl
| Download URL | songbird_py-0.1.9-cp38-cp38-macosx_10_9_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.8 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f44e8c3031b1acf74332d546b7ec28984a677f1635e2f1c2a9933be0a7f08524
|
|
BLAKE2b-256 checksum How to use checksums |
c6fc1bae9b039982e1ec9a774b26c5ff06a4897243c952579977ada494df6048
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|