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.2.tar.gz (41.5 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.2-py3-none-any.whl (59.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scurrypy-0.8.2.tar.gz
  • Upload date:
  • Size: 41.5 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.2.tar.gz
Algorithm Hash digest
SHA256 d249be634fc6b7d0cb64262be0bc3fef9975b81277bb04c8722d7fe1922b1af7
MD5 45fbcc17f1a7274144eb3d6ec10506ec
BLAKE2b-256 f059e72ab947c5f44ee69081dc4ceff6fc1bae316e0604cdfaadf2567dd190ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scurrypy-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 59.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37878f560a779b45d5f8619cb718cada61ad9f5bf70c6bd52181b3a412cc2e54
MD5 d799b43af1600b03432eb01363702cc6
BLAKE2b-256 e6a6fab9fabaa0681ab9d1369ede36c66b813aa3f9b6cec27a9fca58df801fe5

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