Skip to main content
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.

Metadata

Release files for voltricx 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for voltricx 1.0.2
File Size Uploaded Provenance Actions
voltricx-1.0.2.tar.gz 152.3 kB Without provenance Details for voltricx-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for voltricx 1.0.2
File Interpreter ABI Platform Actions
voltricx-1.0.2-py3-none-any.whl Python 3 none any Details for voltricx-1.0.2-py3-none-any.whl

Total release size: 214.8 kB

Release files / voltricx-1.0.2.tar.gz

Download URL voltricx-1.0.2.tar.gz
Size 152.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bcc5fd5f57bb21485dabc252b93c8764fefeb1f9574873ecb5fce4d726442b1a
BLAKE2b-256 checksum
How to use checksums
e66799cfc1c0c26faf1184f39af54bc59c1d93d663a7f144fa96019f4e0422a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / voltricx-1.0.2-py3-none-any.whl

Download URL voltricx-1.0.2-py3-none-any.whl
Size 62.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c72ca059daa131c084b6eba9c7cebd3b31d424f50e5f5e6200f6d45f485b645
BLAKE2b-256 checksum
How to use checksums
24fcd67f6892ccdaf1844fa10118b97b3b98283432bcf2075e8dca5e7b44eddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for voltricx 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page