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.3.tar.gz (41.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-0.8.3-py3-none-any.whl (59.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scurrypy-0.8.3.tar.gz
  • Upload date:
  • Size: 41.9 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.3.tar.gz
Algorithm Hash digest
SHA256 8d558b91c71a66e3d6406ddf5c8c234b5377985b55c478f9113c50f062d237ae
MD5 baea712846309751167a7fc8a5f4329a
BLAKE2b-256 9eb557713951d8b4051cc0f02dcc611bbddf3d75b88e5ca7ade2c9da2af8dfbe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scurrypy-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 59.8 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e40f15987667f127789351ff936936c8664e35e4637c9186ee632126cbb03be
MD5 bdf74184c716f9d57721eacf15486f31
BLAKE2b-256 63f2bb3e3c2a3bb6ad948ee1f34bed5ab4104f20eeccbc947578cacb81b5f6c1

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