Skip to main content

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, Row builders with chaining.
  • Typed data models (User, Message, Channel, ...) and a full exception hierarchy.
  • Automatic retry on 429 with Retry-After, exponential backoff, timeouts.
  • Long-polling event loop with cursor tracking (nothing lost on reconnect).

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.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyyapper 1.0.0
File Size Uploaded
pyyapper-1.0.0.tar.gz 18.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyyapper 1.0.0
File Interpreter ABI Platform
pyyapper-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.4 kB

Release files / pyyapper-1.0.0.tar.gz

Download URL pyyapper-1.0.0.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8f9ebf6b79a2e7f9a03d61480f34d48c5de2c3ae2423765bd51a760e00fcdd0b
BLAKE2b-256 checksum
How to use checksums
4748cd1540b0bfa8510b4a44bb63a615e4375b0146787edb3b68a099fdef1321
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.0.0-py3-none-any.whl

Download URL pyyapper-1.0.0-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
887819db31d63b96a3a17b3fcd6f1940309160df8222202537f084d2d5291289
BLAKE2b-256 checksum
How to use checksums
97507bf42886c7003234a2ca8bdd4ce1483d0a25c5d1e89b4b496e3114be8910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

1.1.0

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page