PyYapper
An intuitive, async Python library for the Yapper bot API.
Designed to feel familiar to discord.py users while staying small and dependency-light.
Install
pip install pyyapper
Requires Python 3.9+ and aiohttp.
Quick start
from pyyapper import Bot
bot = Bot("yb_...") # your token from Settings -> Developer
@bot.command("ping", description="Is the bot alive?")
async def ping(ctx):
await ctx.reply("pong")
@bot.event
async def on_ready(me):
print("online as", me.username)
bot.run()
Features
- Async-first, with a synchronous
bot.run()entry point. - Decorator-based commands and events (
@bot.command,@bot.event,@bot.button). - Rich message context:
ctx.reply,ctx.say,ctx.author_mention,ctx.argv. - Button/interaction helpers:
i.reply,i.ephemeral,i.update,i.ack. Embed,Button,Rowbuilders with chaining.- Typed data models (
User,Message,Channel, ...) and a full exception hierarchy. - Automatic retry on
429withRetry-After, exponential backoff, timeouts. - Long-polling event loop with cursor tracking (nothing lost on reconnect).
- New in 1.1.0: cogs/extensions (
bot.add_cog,bot.load_extension), periodic tasks (tasks.loop), type-hint converters, checks (has_permissions,cooldown, ...), command groups, pagination (Paginator),bot.wait_for, and aWebhookclient.
Error handling
from pyyapper import Bot, NotFound, Forbidden, RateLimited
bot = Bot("yb_...")
async def main():
try:
await bot.delete("some-channel", "some-message")
except NotFound:
print("message already gone")
except Forbidden:
print("missing Manage messages permission")
except RateLimited as e:
print("slow down, retry after", e.retry_after)
import asyncio
asyncio.run(main())
Documentation
See the Yapper developer docs: https://www.yapper.website/developers
License
MIT
Metadata
Release files for pyyapper 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyyapper-1.1.0.tar.gz | 36.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyyapper-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.3 kB
Release files / pyyapper-1.1.0.tar.gz
| Download URL | pyyapper-1.1.0.tar.gz |
|---|---|
| Size | 36.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a11a2c64a3057e13475ecf106821d2d2d84eb41812b0874c8105607a091f0c6
|
|
BLAKE2b-256 checksum How to use checksums |
204c9f992ee9ac677ce99944e812319f31a682d76819bd9ccbd9967a9c283527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / pyyapper-1.1.0-py3-none-any.whl
| Download URL | pyyapper-1.1.0-py3-none-any.whl |
|---|---|
| Size | 38.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63c715f93b0c3c5a8a03b6404091251f09efdfe13dffeb3bdc82ef5be04ee331
|
|
BLAKE2b-256 checksum How to use checksums |
e8a871545747f089973a8065d498eccc04fed9b5949fc4258fd7136de7c5bee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|