Skip to content

MCausc78/pyvolt

Repository files navigation

pyvolt

A simple, flexible API wrapper for Revolt.

Warning

This is alpha software. Please report bugs on GitHub issues if you will find any.

Key Features

  • Built on asyncio.
  • Sane rate limit handling that prevents 429s
  • Fast. Really faster than Revolt.py and voltage.
  • Low memory usage.
  • Customizable architecture. Build object parser in Rust to achieve high speeds.
  • Focuses on supporting both, bot and user accounts.

Installing

Python 3.10 or higher is required

To install the library, you can just run the following command:

# Linux/macOS
python3 -m pip install -U git+https://github.com/MCausc78/pyvolt@master

# Windows
py -3 -m pip install -U git+https://github.com/MCausc78/pyvolt@master

Quick Example

from pyvolt import Client

class MyClient(Client):
    async def on_ready(self, _, /):
        print('Logged on as', self.me)

    async def on_message(self, message, /):
        # don't respond to ourselves
        if message.author_id == self.me.id:
            return

        if message.content == 'ping':
            await message.channel.send('pong')

# You can pass ``bot=False`` to run as user account
client = MyClient(token='token')
client.run()

Links

Why Not

  • pyrevolt - Doesn't follow PEP8 and does a ton of requests on startup (not member list).
  • voltage - Slow and simply copypasta from revolt.py.
  • revolt.py - Slow and unable to disable member list loading.
  • luster - Unmaintained library.

About

An API wrapper for Revolt written in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages