Skip to main content

A modern, simple, and powerful Lavalink wrapper for discord.py.

Project description

Voltricx Banner

The Next-Generation Lavalink Wrapper for Python

PyPI version Python versions License Status

Lavalink version Plugins Support

Docs Version Checks Ruff Checks Pyright Pytest

Publish to PyPI

Quality Gate Coverage Bugs Vulnerabilities Code Smells


Voltricx is a high-performance, feature-rich Lavalink wrapper built for modern Discord bot development in Python. Engineered for speed, reliability, and ease of use, Voltricx offers a professional-grade API that makes audio integration seamless and powerful.


Icon Table of Contents


Icon Why Voltricx?

Icon Next-Gen Performance: Dual-tier caching (LRU/LFU) powered by HyperCache for lightning-fast data retrieval.
Icon Strictly Typed: Comprehensive type hinting and Pydantic v2 validation ensure your code is robust and maintainable.
Icon High-Fidelity Failover: Automated node shifting and silent reconnects ensure a seamless listening experience.
Icon Modern Standards: Fully compatible with Lavalink v4.0+, including native support for the DAVE E2EE protocol and filters.
Icon Smart Load Balancing: Advanced penalty-based node selection for optimal performance across multiple Lavalink nodes.

Icon Features

  • 🚀 Asynchronous Architecture: Built from the ground up to be fully async and non-blocking.
  • 📡 Websocket Management: Efficient handling of Lavalink websocket connections with automatic retries.
  • 🎹 Rich Audio Control: Full support for filters including Equalizer, Timescale, Vibrato, and more.
  • 🌐 DAVE Protocol: Support for the latest Discord Audio Video Encryption standards.
  • ⚖️ Regional Selection: Intelligent node selection based on guild region and node latency.

Icon Installation

Voltricx requires Python 3.12+.

# Stable version from PyPI
pip install voltricx

For the latest development version:

pip install git+https://github.com/revvlabs/voltricx.git

Icon Quickstart

Here is a minimal example of how to get up and running with Voltricx.

import discord
from discord.ext import commands
import voltricx

class MyBot(commands.Bot):
    def __init__(self):
        super().__init__(command_prefix="!", intents=discord.Intents.all())

    async def setup_hook(self):
        # Configuration for your Lavalink Node
        config = voltricx.NodeConfig(
            uri="http://localhost:2333",
            password="youshallnotpass",
            identifier="MAIN-NODE"
        )

        # Initialize the Pool and add the node
        node = voltricx.Node(config=config)
        await voltricx.Pool.add_node(node)

bot = MyBot()

@bot.event
async def on_voltricx_node_ready(node: voltricx.Node):
    print(f"✅ Lavalink Node {node.identifier} is ready and connected!")

@bot.command()
async def play(ctx, *, query: str):
    # Retrieve or create a player for the guild
    player: voltricx.Player = ctx.voice_client or await ctx.author.voice.channel.connect(cls=voltricx.Player)

    # Search for tracks
    tracks = await voltricx.Pool.get_tracks(query)
    if not tracks:
        return await ctx.send("❌ No tracks found.")

    track = tracks[0]
    await player.play(track)
    await ctx.send(f"🎶 **Now playing**: {track.title}")

bot.run("YOUR_BOT_TOKEN")

Icon Examples

Check the example directory for advanced usage, including:


Icon Contributing

We welcome contributions! If you'd like to help improve Voltricx:

  1. Fork the repository.
  2. Clone your fork and create a new feature branch (git checkout -b feature/amazing-feature).
  3. Commit your improvements (git commit -m 'feat: add some amazing feature').
  4. Push the changes to your fork (git push origin feature/amazing-feature).
  5. Open a Pull Request.

Icon License

Voltricx is released under the MIT License. See LICENSE for more information.

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

voltricx-1.0.1.tar.gz (151.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voltricx-1.0.1-py3-none-any.whl (62.2 kB view details)

Uploaded Python 3

File details

Details for the file voltricx-1.0.1.tar.gz.

File metadata

  • Download URL: voltricx-1.0.1.tar.gz
  • Upload date:
  • Size: 151.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for voltricx-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5fcb7ad3c4b9612fd529b33d0a8b701ab32973d86899d446af4accd913b2eb91
MD5 0889bf725e250f2e31e02fd53256ea66
BLAKE2b-256 a1f7f4fae7e56121d8262cd78772888da8e38aa654e569503b6a344c3fbfa87b

See more details on using hashes here.

File details

Details for the file voltricx-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: voltricx-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 62.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for voltricx-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60264a02eafbac09b7774d7228abe727c35ee29da1cc0951dcf0d4d3229dbe76
MD5 a820d9fd8ff597317b3e544ffc79149c
BLAKE2b-256 a4a83ac797068d95bb15adf426ec9845ce76e42a0740e8338623860c5a1d9139

See more details on using hashes here.

Supported by

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