Skip to main content

Dataclass-driven Discord API Wrapper in Python

Project description

ScurryPy

PyPI version

A lightweight, fully readable Discord API framework built to accommodate everything from basic bots to custom frameworks.

While ScurryPy powers many squirrel-related shenanigans, it works just as well for game bots, interactive components, and educational projects.

Philosophy

ScurryPy is built on a simple idea: clarity over magic.

  • Every operation should be traceable.
  • No hidden behavior or side effects.
  • Explicit design over clever abstractions.
  • If you can’t explain a function in 3–6 steps, simplify it.
  • Legacy features can be removed or replaced without rewriting the library.
  • Models = pure data
  • Resources = HTTP logic
  • Nothing mixes responsibilities.

ScurryPy is not discord.py, hikari, disnake, or any other framework. ScurryPy is built from scratch. It is a true Discord API wrapper built on predictable, modern Python principles.

Features

  • Easy to extend and build frameworks on top
  • Lightweight core (<1000 lines)
  • Command, and event handling
  • Unix shell-style wildcards for component routing
  • Declarative style using decorators
  • Supports both legacy and new features
  • Respects Discord's rate limits
  • No __future__ hacks to avoid circular import
  • Capable of sharding

Getting Started

Note: This section also appears in the documentation, but here are complete examples ready to use with your bot credentials.

Installation

To install the ScurryPy package, run:

pip install scurrypy

About the Following Examples: These examples are built using EasyBot, an extension of ScurryPy designed with pre-packaged convenience!

Minimal Slash Command

The following demonstrates building and responding to a slash command.

import scurrypy 
from scurrypy.addons.easy_bot import EasyBot

client = EasyBot(token=TOKEN, application_id=APP_ID)

@client.slash_command("hello", "Say hello", guild_ids=GUILD_ID) # specify guild ID for guild command
async def hello(bot, interaction: scurrypy.Interaction):
    await interaction.respond("Hello!")

client.run()

Minimal Prefix Command (Legacy)

The following demonstrates building and responding to a message prefix command.

import scurrypy 
from scurrypy.addons.easy_bot import EasyBot

client = EasyBot(token=TOKEN, application_id=APP_ID, prefix="!")

@client.prefix("ping")
async def ping_cmd(bot, message: scurrypy.Message):
    await message.send("Pong!")

client.run()

Building on Top of ScurryPy

ScurryPy is designed to be easy to extend with your own abstractions. See Addons documentation for details!

Like What You See?

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

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-0.8.0.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

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

scurrypy-0.8.0-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scurrypy-0.8.0.tar.gz
Algorithm Hash digest
SHA256 466a3e0174f7a004f74458e4ca7684d6394b78b4429a325acb7e8fc023c16212
MD5 68821599c224de05ff9f2ae5b2ca8cdf
BLAKE2b-256 1d6d0cdcbb1c3087a05a89fa808221af103ec1e25385040e2eaef78ff7d7c883

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for scurrypy-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69737f6f134dfd863cdc43bafcdd045ced48ded27e2632e3bd1c0de263b1e7be
MD5 10776cc4cd5f23f6099e0359ca1b4ea3
BLAKE2b-256 43fd79e3bb6fcbb7f053d68b4ac99fee2d44ecede8f7ab705f24a792fa1f270f

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