Skip to main content

Dataclass-driven Discord API Wrapper in Python

Project description

ScurryPy

PyPI version Discord

Fire-breathing squirrel

Clarity over magic: build a bot that lasts ✨

Features

  • Lightweight core
  • Rate limit handling
  • Automatic session & gateway management
  • Automatic sharding
  • Predictable event models and resource classes

Your focus is building what you want instead of fighting a framework.

Installation

Install ScurryPy with pip:

pip install scurrypy

Examples

The following examples are quick drop-in starters if you wish to try ScurryPy.

[!TIP] It is recommended to use a .env file for bot tokens. More details about using a .env file here.

Slash Command

# Set TOKEN, APP_ID (bot user ID), and GUILD_ID (for guild command)

# --- Core library imports ---
from scurrypy import Client

from scurrypy.ext.commands import CommandsAddon, ApplicationCommandContext

# --- Setup bot ---
client = Client(token=TOKEN)
commands = CommandsAddon(client, APP_ID)

@commands.slash_command('greet', 'Greet the bot!', guild_ids=[GUILD_ID])
async def on_greet(ctx: ApplicationCommandContext):
    await ctx.respond("Hello!")

# --- Run the bot ---
client.run()

Prefix Command (Legacy)

# Set TOKEN and APP_ID (bot user ID)

# --- Core library imports ---
from scurrypy import Client, Intents

from scurrypy.ext.prefixes import PrefixAddon, PrefixCommandContext

client = Client(token=TOKEN, intents=Intents.DEFAULT | Intents.MESSAGE_CONTENT)
prefixes = PrefixAddon(client, APP_ID, '!')

# --- Setup bot ---
@prefixes.listen('ping')
async def on_ping(ctx: PrefixCommandContext):
    await ctx.send("Pong!")

# --- Run the bot ---
client.run()

Dependencies

ScurryPy has exactly 3 required dependencies:

  • aiohttp (HTTP client)
  • websockets (Gateway connection)
  • aiofiles (Async file operations)

These dependencies are automatically installed with ScurryPy's pip package.

Learn More

Explore the full documentation for more examples, guides, and API reference.

See the manifesto section for details!

Got some questions? Check out the FAQ page for commonly asked questions!

Looking for changes? See the Changelog.

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

scurrypy-2.2.0.tar.gz (68.9 kB view details)

Uploaded Source

Built Distribution

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

scurrypy-2.2.0-py3-none-any.whl (107.5 kB view details)

Uploaded Python 3

File details

Details for the file scurrypy-2.2.0.tar.gz.

File metadata

  • Download URL: scurrypy-2.2.0.tar.gz
  • Upload date:
  • Size: 68.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for scurrypy-2.2.0.tar.gz
Algorithm Hash digest
SHA256 b883f7a9dc8fb4ad7e38f690ec19d9e45de5fc7923fb638c391d6587202b0830
MD5 22d694cf5c2223b38fffb4a286a01c9f
BLAKE2b-256 c671af497ab64e95a946c3d88818236eccd94ec673d59ebf7369b79440ec323a

See more details on using hashes here.

File details

Details for the file scurrypy-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: scurrypy-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 107.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for scurrypy-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9de8dbe2c3cdd46be68bd9ecb5c05702aeed4dc53e7d29948f2abf92c8678fb2
MD5 a9d5655d885f77f68bf557c1741de871
BLAKE2b-256 13cf82d05630d57aac457a1899e1a5477602b975d3a7b54322dbf74f24c6afce

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