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

Uploaded Python 3

File details

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

File metadata

  • Download URL: scurrypy-2.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 35511f2ddff1e47299e2f3b6fe2cdcccfa00ff3ddb5e9671ff7b9ca9fd219b70
MD5 7a7711929381c95ac7242c67795fc5fc
BLAKE2b-256 a5d282f2e391401a747ff35f2e4f9703aaaba1d62143f15bcf2d3ced677abe5d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scurrypy-2.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7547c108f33ec86f4f07e2a91d1c0762506e3ffb8dd18a2971f27e9ebd92be7d
MD5 0bf4c01d0a6ca3ba8ef2307bc0573286
BLAKE2b-256 2c01377435ce54d968deec433e2bf12b55d3efca7d49cc4713cd13ec021c65ee

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