Skip to main content

A Python wrapper for the Revolt API

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

A simple, flexible API wrapper for Revolt.

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()

Bot Example

from pyvolt.ext import commands

# Pass `self_bot=True` to make your bot listen only to you
bot = commands.Bot(command_prefix='!')

@bot.command()
async def ping(ctx):
    await ctx.send('Pong!')

token = 'token'

# That's also allowed, just like in `discord.py`. Pass `bot=False` keyword argument if you want to run as user account.
bot.run(token)

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.

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

pyvolt_re-1.0.1.tar.gz (290.2 kB view details)

Uploaded Source

Built Distribution

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

pyvolt_re-1.0.1-py3-none-any.whl (331.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyvolt_re-1.0.1.tar.gz
Algorithm Hash digest
SHA256 aee38e3b576a8e034b3353d8ce29fe309fd5215f3335efe25168a299f30a50fb
MD5 bcba4924c898fd96bc6ddb93db859db0
BLAKE2b-256 7edc13a848a6e181e06233f4c4f83c21c5afe10fe822b320e182789902f4b1fd

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyvolt_re-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49580ade1b9142abf6ca005d029bab500bd6eba8ec73d519b823c0413dae0340
MD5 f53fccc520801ece85f3f1f0df26c86b
BLAKE2b-256 21b6a4a057e9724f3cc6c5586759e67c62b7bb89b402eaa32bbf82189a975bea

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