Skip to content

scurry-works/scurrypy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

137 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScurryPy

PyPI version Discord

Fire-breathing squirrel

Clarity over magic: build a bot that lasts ✨

Development Note: While ScurryPy has not received an update in a while, it is still actively maintained!

Features

  • Lightweight core
  • Strictly typed
  • Rate limit handling
  • Automatic session & gateway management
  • Automatic sharding
  • Predictable event models and resource classes

Your focus is building what you want instead of fighting a framework.

ScurryPy is a stability-first Discord runtime built around explicit API coverage and strict scope boundaries to minimize long-term breakage.

Installation

Install ScurryPy with pip:

pip install scurrypy

Examples

The following examples are quick drop-in starters if you wish to try ScurryPy.

Tip

It is recommended to use a .env file for bot tokens. More details about using a .env file here.

Slash Command

# Set TOKEN, APP_ID (bot user ID), and GUILD_ID (for guild command)

# --- Core library imports ---
from scurrypy import Client

from scurrypy.ext.commands import CommandsAddon, ApplicationCommandContext

# --- Setup bot ---
client = Client(token=TOKEN)
commands = CommandsAddon(client, APP_ID)

@commands.slash_command('greet', 'Greet the bot!', guild_ids=[GUILD_ID])
async def on_greet(ctx: ApplicationCommandContext):
    await ctx.respond("Hello!")

# --- Run the bot ---
client.run()

Prefix Command (Legacy)

# Set TOKEN and APP_ID (bot user ID)

# --- Core library imports ---
from scurrypy import Client, Intents

from scurrypy.ext.prefixes import PrefixAddon, PrefixCommandContext

client = Client(token=TOKEN, intents=Intents.DEFAULT | Intents.MESSAGE_CONTENT)
prefixes = PrefixAddon(client, APP_ID, '!')

# --- Setup bot ---
@prefixes.listen('ping')
async def on_ping(ctx: PrefixCommandContext):
    await ctx.send("Pong!")

# --- Run the bot ---
client.run()

Dependencies

ScurryPy has exactly 3 required dependencies:

  • aiohttp (HTTP client)
  • websockets (Gateway connection)
  • aiofiles (Async file operations)

These dependencies are automatically installed with ScurryPy's pip package.

Learn More

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

See the manifesto section for details!

Got some questions? Check out the FAQ page for commonly asked questions!

Looking for changes? See the Changelog.

About

Minimal, explicit Discord API wrapper designed for clarity and control

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages