Skip to main content

No project description provided

Project description

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.

Songbird-py Docs

Dependencies

Rust will need to be installed to build the project (this happens automatically when you install it from pip!). Currently there are no prebuilt-binaries. This library requires Opus to be installed. ffmpeg functions also require FFmpeg to be installed.

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

pyo3 docs

pyo3 asyncio

pyo3 asyncio docs You can also look at the async secion of the pyo3 docs.

Songbird

Link

docs

Its a good idea to install all the dependencies.

What should you run to test your changes?

I recommend working off of the hikari example. Make sure to run maturin develop when anything is changed!

Goal of the project

Create API for songbird driver and everything that is needed with it it.

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

songbird_py-0.1.1.tar.gz (112.1 kB view details)

Uploaded Source

Built Distributions

songbird_py-0.1.1-cp310-none-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

songbird_py-0.1.1-cp310-cp310-manylinux_2_24_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

songbird_py-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

songbird_py-0.1.1-cp39-none-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

songbird_py-0.1.1-cp39-cp39-manylinux_2_24_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

songbird_py-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

songbird_py-0.1.1-cp38-none-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

songbird_py-0.1.1-cp38-cp38-manylinux_2_24_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

songbird_py-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file songbird_py-0.1.1.tar.gz.

File metadata

  • Download URL: songbird_py-0.1.1.tar.gz
  • Upload date:
  • Size: 112.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d0e39ff430c89e03e97e8cf8f34b8f896eb5fa1f2104ed0bb79a7924e016a65f
MD5 7cf27282c98205abd2a03cf722513133
BLAKE2b-256 34e38abfc0142db417cbd0dd1d01223aff11edbc92abe5729e3e920ab36473e9

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp310-none-win_amd64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 731906854eb4456626b6b1552167b9811668db003e4a241e354f45e1fabca728
MD5 a9b70e91c6c5918505fe24cb8fac0bf4
BLAKE2b-256 6d685e374026e22959989be7b7c8cd859576e54260457521a3d62cb41a176a30

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp310-cp310-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 32d27eff01c038cd2347783c8419e6fd3523b1d60258fce245b87d0789cb958e
MD5 29509330b2b82e4554d199bf386ff6ce
BLAKE2b-256 c9051300237d1f7b4b854332819706378161eaa87f8d89d35b5680337a725768

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 af029af649cfbff1ffa2a808ff1db1f907d1dfb7afeddf3d52b87a8b79ef8f82
MD5 946570797e1674d95208024b3a4ffd01
BLAKE2b-256 91a53c0aa6ec43854e95a3ce674ce6f7c35b85a3a7e360e04a960987a5db3ca6

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp39-none-win_amd64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 0e4295a80a246851c0e737365405d3d9aaf35beb0868158cea415fc59fd5c2e8
MD5 8e0aff793a3edf30441fc4f878e4c56d
BLAKE2b-256 bdd89a8517e09a664eceafcd3ad6635be7aec011592493bdc32968845e9b3056

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp39-cp39-manylinux_2_24_x86_64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp39-cp39-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.9, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 4e4af9974f474be58912730619036de86d4e74d8bd96424160ac18e26bf6bf99
MD5 e1343840d74bd8fe5e94618fcf30cd74
BLAKE2b-256 896743ee7d112886c1e252662537d659c90bf3ef2ca88f5a8bf52affaca11cf7

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 328e867a8e50d281b69dd0329e385909491e8e78771f4d0a67e52075b87f3f29
MD5 f24f353ad4c6f00ecb4ba80943cdf35b
BLAKE2b-256 223daed6750fd8f2130a7affa5ed27608a7141db3506c087588c4505fe86a2ae

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp38-none-win_amd64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 2fabce87cf1995fb2531947ce03ee75d990f2b253ce6d76945cf1a4a738adfc0
MD5 76336b39b131da1e92b3c662cee1dbee
BLAKE2b-256 65184ee9633b54817411bc2e18d0725e1cd250bbfeeebe701362152d5f0dca95

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp38-cp38-manylinux_2_24_x86_64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp38-cp38-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.8, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 1b3d583d8f21f7f7e060ba32953f541c543f77a344ef8695bbf2a586b4e28557
MD5 dc99dd4068508f5d87201292f934f1e9
BLAKE2b-256 d5ee2a8495e6c3fbe1acfe3471c61a92ebc74e951c1ba741c33af5fa29f3c4dc

See more details on using hashes here.

File details

Details for the file songbird_py-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: songbird_py-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for songbird_py-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 03453b79ba0573c6b4c3dc819539b026c9bbdb92c09c9b8d8434b1383eda70f1
MD5 91ef5f93afcf2c5024e2a2b5a9c5559b
BLAKE2b-256 1965e5016803a1903f0477e274f78ec15063141b3ad98fe673c4da795e0657c6

See more details on using hashes here.

Supported by

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