Skip to main content

A python client for the audio provider Andesite for use with

Project description


granitepy is a python wrapper for the Lavalink like audio provider called Andesite for use with



From Pypi

pip install -U granitepy

From Github

pip install -U git+


from discord.ext import commands
import granitepy

bot = commands.Bot(command_prefix = "!")
bot.granitepy = granitepy.Client(bot)

async def on_ready():
    await bot.granitepy.create_node(

async def connect(ctx):
    # Create or fetch a player.
    player = bot.granitepy.get_player(guild=ctx.guild)

    # Check is the author is in a voice channel.
    if not
        return await ctx.send("You must be connected to a voice channel")

    # Connect to the authors voice channel.
    await player.connect(
    return await ctx.send(f"Connected to {}!")

async def play(ctx, *, search):
    player = bot.granitepy.get_player(guild=ctx.guild)

    # Search for whatever the user has inputted.
    result = await player.get_tracks(search)

    # The users search returned nothing.
    if not result:
        return await ctx.send("No tracks were found.")

    # Check if the result is a playlist.
    if isinstance(result, granitepy.Playlist):
        # Play the first track in the playlist.
        return await[0])
        # Play the first track in the list of results.
        return await[0])"token")

Project details

Download files

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

Files for granitepy, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size granitepy-0.4.2-py3-none-any.whl (24.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size granitepy-0.4.2.tar.gz (11.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page