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

Uploaded Python 3

File details

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

File metadata

  • Download URL: scurrypy-2.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 0a6415167d7a040b6853e97dd8e3f802a4a2ab5b8e45c8ae225ef0f17eb1e29a
MD5 e375f834437076058580ce331bcd373d
BLAKE2b-256 40cd8c818dbcbab8a385663b86a252d7f5bf4801ebe988829ae5534f1e34b2c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scurrypy-2.1.1-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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30ac21b6bb6a00672e5eda4fd5209c3b09195e020dde995cbe67ba4b01349d12
MD5 916501c1386005836feadc37e254379e
BLAKE2b-256 9c44c4bd2d7fb88f067c0457f6d9767b50762e927aea517f8d6def44a11eb080

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