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.4.tar.gz (43.6 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.4-py3-none-any.whl (62.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scurrypy-0.8.4.tar.gz
  • Upload date:
  • Size: 43.6 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.4.tar.gz
Algorithm Hash digest
SHA256 ec4f2fb418af31a548a78f1dbe7c2d8bfc33b613d8d3b2b490e2ac0c08e1083b
MD5 cf114bd4bef87416784f4010665cbdbf
BLAKE2b-256 6c2700428e22d6c6e151b1f4495b8fbded400a813d50bc433aab4db23b63a0a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scurrypy-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 62.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1a68f59aaf98053f77e7f0cf4646ead0f24f8e4aaea8461d5f4f35f9153fd96b
MD5 03b01d4fb6a2ebd3e941386e2e50c618
BLAKE2b-256 9000ecb6c15e8c95ade4d1c07e05e9599c205a460775876a915299f430e64ba1

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