=======
Détaché is a framework for creating productive and efficient Discord bots, built off of
`discord.py <http://github.com/Raptzz/discord.py/>`_.
With Détaché, you can easily create bots without sacrificing direct access to the API. Commands and similar features
are split into groups called Plugins, allowing for better organization. It's inspired by the simplicity of Click
and Flask.
Détaché's features include:
- intuitive argument parsing with support for custom types
- automatic documentation and help messages
- support for per-guild bot prefix via a callback
- support for sharding
Here's a simple bot that does math:
.. code-block:: python
import detache
bot = detache.Bot(default_prefix="!")
@bot.plugin("Math")
class MathPlugin(detache.Plugin):
"""
Basic math commands.
"""
@detache.command("add", "Adds two numbers.")
@detache.argument("a", detache.Number, help="First addend")
@detache.argument("b", detache.Number, help="Second addend")
async def add(self, ctx, a, b):
return a + b
@detache.command("subtract")
@detache.argument("a", detache.Number, help="Minuend")
@detache.argument("b", detache.Number, help="Subtrahend")
async def subtract(self, ctx, a, b):
"""Subtracts two numbers."""
return a - b
Both commands take two arguments, "a" and "b", which are specified as numbers. The commands return the sum or
difference, which Détaché automatically replies with. If argument parsing fails, the generated documentation will be
shown.
Commands can be documented with the command decorator, or by using docstrings.
TODO: Plugin, command, and argument descriptions are shown in the automatically generated help message.
You can install the library from PyPI: ::
$ pip install detache
Metadata
Release files for detache 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| detache-0.2.3.tar.gz | 10.1 kB | Without provenance | Details for detache-0.2.3.tar.gz |
Release files / detache-0.2.3.tar.gz
| Download URL | detache-0.2.3.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b7905413be8975c90434df07230069c6c0fe1340043c4d8ab873b4d8fbb909d
|
|
BLAKE2b-256 checksum How to use checksums |
854a0a25d369276c751371d4d7a06b8de4a08b830f74e6b4691a870a7ac3d26a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4
|
Security for detache 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.