stoat.py
A simple, flexible API wrapper for Stoat.
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 stoat.py
# Windows
py -3 -m pip install -U stoat.py
Or to install alpha master (with all new features):
# Linux/macOS
python3 -m pip install -U git+https://github.com/MCausc78/stoat.py@master
# Windows
py -3 -m pip install -U git+https://github.com/MCausc78/stoat.py@master
Quick Example
from stoat 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 stoat.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)
Links
Why Not
Metadata
Release files for stoat.py 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stoat_py-1.2.1.tar.gz | 337.3 kB | Without provenance | Details for stoat_py-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stoat_py-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for stoat_py-1.2.1-py3-none-any.whl |
Total release size: 717.5 kB
Release files / stoat_py-1.2.1.tar.gz
| Download URL | stoat_py-1.2.1.tar.gz |
|---|---|
| Size | 337.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc680a58c61f6e39b9cf29b36d1d0ddc8de03511379167bb8d4618514f770d4f
|
|
BLAKE2b-256 checksum How to use checksums |
c07e4482e46fe22a89ac8d603cc42c531bc6efa743b5a7f1db7f4ef9463dc3ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / stoat_py-1.2.1-py3-none-any.whl
| Download URL | stoat_py-1.2.1-py3-none-any.whl |
|---|---|
| Size | 380.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
339a5e4cb8b3ad2fcd590672af5368076aab1298886e57ce5a5db51d989fda95
|
|
BLAKE2b-256 checksum How to use checksums |
f7d903b658ddb65f3c7e9f37b340be2beab5d191b39f81c4b773ba7b48583dc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for stoat.py 1.2.1
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.