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.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

songbird_py-0.1.0-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.0-cp39-none-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

songbird_py-0.1.0-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.0-cp38-none-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

songbird_py-0.1.0-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.0.tar.gz.

File metadata

  • Download URL: songbird-py-0.1.0.tar.gz
  • Upload date:
  • Size: 27.0 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.0.tar.gz
Algorithm Hash digest
SHA256 3fbb0cd5eb1c44be55382c92f18229181b274e19dcc4d7c51cc29e0ebac848bb
MD5 6e4b8fb581c589cd3873c7f5b19276a7
BLAKE2b-256 a44a01509776f7785ca35223dd0d3fc8f4bf44f67f1d3c0fae918af9b4f390c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: songbird_py-0.1.0-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.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 0f3ea8ab0dbbc38a21fc3984c3a9438b9f308f3750e91638a0f88f647e183fb2
MD5 5ab9d5f99fb424450b1b4bf204f6ce76
BLAKE2b-256 6f8c0e851ec4126fd8ea8b116c1b4b5b647a5ceccc15646ed00e5eb847fffb0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: songbird_py-0.1.0-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.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5d0491003db90d95e642bc92c7ca6b403d7eea8a07e8b46bbcdb13a84c346011
MD5 828a9b8cfba134988b7c54dddb898f51
BLAKE2b-256 626a4be94d88aa149bdb692de43a1c26dd28c54a12382566d61efd0d3b21fc14

See more details on using hashes here.

File details

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

File metadata

  • Download URL: songbird_py-0.1.0-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.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 18e552c6ab2f614f153ca8105964917089ab44eeec63cfbdb8ef3aa9a860def9
MD5 d29da4a498bf344312c2568c7508bad5
BLAKE2b-256 8c19eaa161398b81538c7d4165f7f5e61fa0c60460ea00ae1308c190d36407a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: songbird_py-0.1.0-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.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f173702aa51c6604409807df3c14deca406dcb0ed58b3e7b38419efdb8a7ccd0
MD5 293a1901c92d2a6162ed3bcef6c8807e
BLAKE2b-256 13470b91c2a32b8c5ad9fa7a6069f150d608022c132c7058ccb5b1827879005e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: songbird_py-0.1.0-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.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 9df035880c25f99d5df1fdf46caa910def385ab5a9370dbcc016be2982c53889
MD5 bab748fed0ecb23d5f85964e59cb4e0a
BLAKE2b-256 9384ab1ae445d583031d92738430f4de166360404952af0ccef30aaa2e0a3417

See more details on using hashes here.

File details

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

File metadata

  • Download URL: songbird_py-0.1.0-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.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 447b5ea0338604c70e8a9a5533df9683438854d6202332b9b1d70d24d711b8d5
MD5 7fdc3f0b5d9a4c63886276848f073c19
BLAKE2b-256 5b005ab3383851e51203e624962389dad54f155bb7f4dae45fb6e746d5c456a6

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