Skip to main content

Dataclass-driven Discord API Wrapper in Python

Project description

ScurryPy

PyPI version

Official Repository
This is the original and official repository of ScurryPy, maintained by Furmissile.
Forks and community extensions are welcome under the project’s license and attribution guidelines.

A dataclass-driven Discord API wrapper in Python!

While this wrapper is mainly used for various squirrel-related shenanigans, it can also be used for more generic bot purposes.

Features

  • 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

Notes & Early Status

  • This is an early version — feedback, ideas, and contributions are very welcome! That said, there may be bumps along the way, so expect occasional bugs and quirks.
  • Certain features are not yet supported, while others are intentionally omitted. See the docs for full details.

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

Minimal Slash Command

The following demonstrates building and responding to a slash command.

Note: Adjust dotenv_path if your .env file is not in the same directory as this script.

import scurrypy, os
from dotenv import load_dotenv

load_dotenv(dotenv_path='./path/to/env')

client = scurrypy.Client(
    token=os.getenv("DISCORD_TOKEN"),
    application_id=APPLICATION_ID  # your bot’s application ID
)

@client.command(
    command=scurrypy.SlashCommand(
        name='example',
        description='Demonstrate the minimal slash command!'
    ),
    guild_ids=GUILD_ID  # must be a guild ID your bot is in
)
async def example(bot: scurrypy.Client, event: scurrypy.InteractionEvent):
    await event.interaction.respond(f'Hello, {event.interaction.member.user.username}!')

client.run()

Minimal Prefix Command (Legacy)

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

import scurrypy, os
from dotenv import load_dotenv

load_dotenv(dotenv_path='./path/to/env')

client = scurrypy.Client(
    token=os.getenv("DISCORD_TOKEN"),
    application_id=APPLICATION_ID  # your bot’s application ID
    intents=scurrypy.set_intents(message_content=True),
    prefix='!'  # your custom prefix
)

@client.prefix_command
async def ping(bot: scurrypy.Client, event: scurrypy.MessageCreateEvent):
    # The function name is the name of the command
    await event.message.send("Pong!")

client.run()

Contribution and Fork Policy

ScurryPy follows a simple philosophy: clarity, simplicity, and direct interaction with the Discord API. It favors explicit, dataclass-driven design over heavy abstraction — and contributions should stay true to that style.

This is a community-supported project guided by the design and principles of Furmissile. You are welcome to explore, modify, and extend the codebase under the terms of its license — but please follow these guidelines to ensure proper attribution and clarity.

You May

  • Fork this repository for personal or collaborative development.
  • Submit pull requests for bug fixes or new features that align with ScurryPy’s goals.
  • Reuse parts of the code in your own projects, provided attribution is preserved.

You May NOT

  • Remove or alter existing copyright notices or attributions.
  • Present a fork as the official ScurryPy project.
  • Use the name “ScurryPy” or its documentation to promote a fork without permission.

If you plan to make substantial changes or release your own variant:

  • Rename the fork to avoid confusion (e.g., scurrypy-plus or scurrypy-extended).
  • Add a note in your README acknowledging the original project:

"This project is a fork of ScurryPy by Furmissile."

License

This project is licensed under the Furmissile License, which allows viewing, modification, and redistribution with proper attribution.

See the License 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.6.tar.gz (39.2 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.6-py3-none-any.whl (52.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scurrypy-0.6.tar.gz
Algorithm Hash digest
SHA256 b78f55d351787166c18cde3ab2e4c8f296ecd94d36d634edf26be26e6a31420e
MD5 dcfebef4bca170a32ad940c0df79f2aa
BLAKE2b-256 8cf7424288aeb79cc6dce6771f96bfb84bdfda71ec6c046fad3be5f24cf3d648

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scurrypy-0.6-py3-none-any.whl
  • Upload date:
  • Size: 52.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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d38b14c7c982cad6cef63153c414796dcc40c8deb19e2695c9b109ead4f37446
MD5 2a0a5fa837c3ef959cfa2bf9b03848b9
BLAKE2b-256 ec504d2f3ebed6ca79577505fd6582c26547d297ed01f24a6309c1334c798f9a

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