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 pyvolt-re

# Windows
py -3 -m pip install -U pyvolt-re

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.2.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.2-py3-none-any.whl (331.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyvolt_re-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 f6302b217f5c653b58dec6a0da68863c4fc0e4c904a0a18ecf186b1bf09b8182
MD5 7f59bb570ef68bdea9c7b9c6e8ea33cd
BLAKE2b-256 e99ff4f1f76645a126d09308f55160969a4154b26ecae5cb2673d49bf726f738

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyvolt_re-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf118c2ebc8a641d88a3296a32a5d9ab0ba46adb362b12a5b8ab58e04b13c20a
MD5 e73796139c4e860dbfbc5b7f8bc1b18e
BLAKE2b-256 e6ae5757e8de481b29ac224c10326647cace6ab87ad3efad2446cd177b232100

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