udo.py


Nameudo.py JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
Summarydiscord is discord.py bot debug tools
upload_time2024-06-26 16:51:22
maintainerNone
docs_urlNone
authorblket.dev
requires_python>=3.9
licenseMIT
keywords udo discord.py discord cog repl extension jishaku
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## This module is built on top of Jishaku.
> 1. Download jishaku
> ```bash
> pip install -U "jishaku @ git+https://github.com/Gorialis/jishaku@master"
> ```


udo is an extension for bot developers that enables rapid prototyping, experimentation, and debugging of features for bots.

One of udo's core philosophies is to be dynamic and easy-to-use. Here's the two step install:

> 1. Download udo on the command line using pip:
> ```bash
> pip install -U udo
> ```
> 2. Load the extension in your bot code before it runs:
> ```python
> bot.load_extension('udo')
> # or
> await bot.load_extension('udo')
> ```
> That's it!

You can also import the module to use the command development utilities.

## Command reference

<table>
    <tr>
        <td width="60px">
            <img align="left" width="50" src="https://github.com/Gorialis/jishaku/blob/master/.github/assets/python_logo.svg">
        </td>
        <td>
            <h4>&gt; <code>udo [py|python] &lt;argument&gt;</code></h4>
            The Python commands execute or evaluate Python code passed into them.
            It supports simple expressions:
            <br><br> <!-- Horrifying that I have to do this -->
            <blockquote>
                <p>&gt;  <i>udo py 3+4</i></p>
                <img align="left" width="50" height="50" src="https://github.com/Gorialis/jishaku/blob/master/.github/assets/beep_bot.svg">
                    <p><b>Beep Bot</b></p>
                    7
            </blockquote>
            <br>
            It also supports async expressions:
            <br><br>
            <blockquote>
                <p>&gt;  <i>udo py await _ctx.pins()</i></p>
                <img align="left" width="50" height="50" src="https://github.com/Gorialis/jishaku/blob/master/.github/assets/beep_bot.svg">
                    <p><b>Beep Bot</b></p>
                    [&lt;Message id=123456789012345678 ...&gt;, ...]
            </blockquote>
            <br>
            You can pass in codeblocks for longer blocks of code to execute, and you can use <code>yield</code> to return intermediate results within your processing.
            <br><br>
            The <i>inspect</i> variant of the command will return a codeblock with detailed inspection information on all objects returned.
            <br><br>
            The variables available by default in all execution contexts are:
            <br><br>
            <table>
                <tr>
                    <td><code>_ctx</code></td>
                    <td>
                        The <a href="https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context">Context</a> that invoked the command.
                    </td>
                </tr>
                <tr>
                    <td><code>_bot</code></td>
                    <td>
                        The running <a href="https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot">Bot</a> instance.
                    </td>
                </tr>
                <tr>
                    <td><code>_author</code><br><code>_channel</code><br><code>_guild</code><br><code>_me</code><br><code>_message</code><br><code>_msg</code></td>
                    <td>
                        Shortcuts for attributes on <a href="https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context"><code>_ctx</code></a>.
                    </td>
                </tr>
                <tr>
                    <td><code>_find</code><br><code>_get</code></td>
                    <td>
                        Shortcuts for <a href="https://discordpy.readthedocs.io/en/latest/api.html#utility-functions"><code>discord.utils</code></a> functions.
                    </td>
                </tr>
            </table>
            <br>
            The underscore prefix on the provided variables is intended to help prevent shadowing when writing large blocks of code within the command.
            <br>
            If you decide that you don't want the prefix, you can disable it by setting the <code>udo_NO_UNDERSCORE</code> environment variable to <code>true</code>.
            <br><br>
            Each Python command is individually scoped. That means variables you create won't be retained in later invocations.
            <br>
        </td>
    </tr>
</table>

<table>
    <tr>
        <td width="60px">
            <img align="left" width="50" src="https://github.com/Gorialis/jishaku/blob/master/.github/assets/terminal.svg">
        </td>
        <td>
            <h4>&gt; <code>udo [sh|shell] &lt;argument&gt;</code></h4>
            The shell command executes commands within your system shell.
            <br><br>
            If you're on Linux and are using a custom shell, udo will obey the <code>SHELL</code> environment variable, otherwise, it will use <code>/bin/bash</code>.
            <br>
            On Windows, udo will use PowerShell if it's detected, otherwise, it will use Command Prompt.
            <br><br>
        </td>
    </tr>
</table>

<table>
    <tr>
        <td width="60px">
            <img align="left" width="50" src="https://github.com/Gorialis/jishaku/blob/master/.github/assets/extension.svg">
        </td>
        <td>
            <h4>&gt; <code>udo [load|reload] [extensions...]</code></h4>
            <h4>&gt; <code>udo unload [extensions...]</code></h4>
            These commands load, reload, or unload extensions on your bot.
            <br><br>
            You can reload udo itself with <code>jsk reload udo</code>.
            <br>
            <code>jsk reload ~</code> will reload all extensions on your bot.
            <br><br>
            You can load, reload, or unload multiple extensions at once: <code>jsk reload cogs.one cogs.two</code>
            <br><br>
            <h4>&gt; <code>udo shutdown</code></h4>
            This command gracefully shuts down your bot.
            <br><br>
            <h4>&gt; <code>udo rtt</code></h4>
            This command calculates <a href="https://en.wikipedia.org/wiki/Round-trip_delay">Round-Trip Time</a> for your bot to the API. It does this by calculating response time samples, so you can tell if your bot is being slow or not.
            <br><br>
        </td>
    </tr>
</table>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "udo.py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "udo, discord.py, discord, cog, repl, extension, jishaku",
    "author": "blket.dev",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/6a/44/691528b1648fae52a37dc7839bf2ab63cb002d66bded44d0aa0de05882cd/udo_py-1.0.2.tar.gz",
    "platform": null,
    "description": "## This module is built on top of Jishaku.\r\n> 1. Download jishaku\r\n> ```bash\r\n> pip install -U \"jishaku @ git+https://github.com/Gorialis/jishaku@master\"\r\n> ```\r\n\r\n\r\nudo is an extension for bot developers that enables rapid prototyping, experimentation, and debugging of features for bots.\r\n\r\nOne of udo's core philosophies is to be dynamic and easy-to-use. Here's the two step install:\r\n\r\n> 1. Download udo on the command line using pip:\r\n> ```bash\r\n> pip install -U udo\r\n> ```\r\n> 2. Load the extension in your bot code before it runs:\r\n> ```python\r\n> bot.load_extension('udo')\r\n> # or\r\n> await bot.load_extension('udo')\r\n> ```\r\n> That's it!\r\n\r\nYou can also import the module to use the command development utilities.\r\n\r\n## Command reference\r\n\r\n<table>\r\n    <tr>\r\n        <td width=\"60px\">\r\n            <img align=\"left\" width=\"50\" src=\"https://github.com/Gorialis/jishaku/blob/master/.github/assets/python_logo.svg\">\r\n        </td>\r\n        <td>\r\n            <h4>&gt; <code>udo [py|python] &lt;argument&gt;</code></h4>\r\n            The Python commands execute or evaluate Python code passed into them.\r\n            It supports simple expressions:\r\n            <br><br> <!-- Horrifying that I have to do this -->\r\n            <blockquote>\r\n                <p>&gt;  <i>udo py 3+4</i></p>\r\n                <img align=\"left\" width=\"50\" height=\"50\" src=\"https://github.com/Gorialis/jishaku/blob/master/.github/assets/beep_bot.svg\">\r\n                    <p><b>Beep Bot</b></p>\r\n                    7\r\n            </blockquote>\r\n            <br>\r\n            It also supports async expressions:\r\n            <br><br>\r\n            <blockquote>\r\n                <p>&gt;  <i>udo py await _ctx.pins()</i></p>\r\n                <img align=\"left\" width=\"50\" height=\"50\" src=\"https://github.com/Gorialis/jishaku/blob/master/.github/assets/beep_bot.svg\">\r\n                    <p><b>Beep Bot</b></p>\r\n                    [&lt;Message id=123456789012345678 ...&gt;, ...]\r\n            </blockquote>\r\n            <br>\r\n            You can pass in codeblocks for longer blocks of code to execute, and you can use <code>yield</code> to return intermediate results within your processing.\r\n            <br><br>\r\n            The <i>inspect</i> variant of the command will return a codeblock with detailed inspection information on all objects returned.\r\n            <br><br>\r\n            The variables available by default in all execution contexts are:\r\n            <br><br>\r\n            <table>\r\n                <tr>\r\n                    <td><code>_ctx</code></td>\r\n                    <td>\r\n                        The <a href=\"https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context\">Context</a> that invoked the command.\r\n                    </td>\r\n                </tr>\r\n                <tr>\r\n                    <td><code>_bot</code></td>\r\n                    <td>\r\n                        The running <a href=\"https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot\">Bot</a> instance.\r\n                    </td>\r\n                </tr>\r\n                <tr>\r\n                    <td><code>_author</code><br><code>_channel</code><br><code>_guild</code><br><code>_me</code><br><code>_message</code><br><code>_msg</code></td>\r\n                    <td>\r\n                        Shortcuts for attributes on <a href=\"https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context\"><code>_ctx</code></a>.\r\n                    </td>\r\n                </tr>\r\n                <tr>\r\n                    <td><code>_find</code><br><code>_get</code></td>\r\n                    <td>\r\n                        Shortcuts for <a href=\"https://discordpy.readthedocs.io/en/latest/api.html#utility-functions\"><code>discord.utils</code></a> functions.\r\n                    </td>\r\n                </tr>\r\n            </table>\r\n            <br>\r\n            The underscore prefix on the provided variables is intended to help prevent shadowing when writing large blocks of code within the command.\r\n            <br>\r\n            If you decide that you don't want the prefix, you can disable it by setting the <code>udo_NO_UNDERSCORE</code> environment variable to <code>true</code>.\r\n            <br><br>\r\n            Each Python command is individually scoped. That means variables you create won't be retained in later invocations.\r\n            <br>\r\n        </td>\r\n    </tr>\r\n</table>\r\n\r\n<table>\r\n    <tr>\r\n        <td width=\"60px\">\r\n            <img align=\"left\" width=\"50\" src=\"https://github.com/Gorialis/jishaku/blob/master/.github/assets/terminal.svg\">\r\n        </td>\r\n        <td>\r\n            <h4>&gt; <code>udo [sh|shell] &lt;argument&gt;</code></h4>\r\n            The shell command executes commands within your system shell.\r\n            <br><br>\r\n            If you're on Linux and are using a custom shell, udo will obey the <code>SHELL</code> environment variable, otherwise, it will use <code>/bin/bash</code>.\r\n            <br>\r\n            On Windows, udo will use PowerShell if it's detected, otherwise, it will use Command Prompt.\r\n            <br><br>\r\n        </td>\r\n    </tr>\r\n</table>\r\n\r\n<table>\r\n    <tr>\r\n        <td width=\"60px\">\r\n            <img align=\"left\" width=\"50\" src=\"https://github.com/Gorialis/jishaku/blob/master/.github/assets/extension.svg\">\r\n        </td>\r\n        <td>\r\n            <h4>&gt; <code>udo [load|reload] [extensions...]</code></h4>\r\n            <h4>&gt; <code>udo unload [extensions...]</code></h4>\r\n            These commands load, reload, or unload extensions on your bot.\r\n            <br><br>\r\n            You can reload udo itself with <code>jsk reload udo</code>.\r\n            <br>\r\n            <code>jsk reload ~</code> will reload all extensions on your bot.\r\n            <br><br>\r\n            You can load, reload, or unload multiple extensions at once: <code>jsk reload cogs.one cogs.two</code>\r\n            <br><br>\r\n            <h4>&gt; <code>udo shutdown</code></h4>\r\n            This command gracefully shuts down your bot.\r\n            <br><br>\r\n            <h4>&gt; <code>udo rtt</code></h4>\r\n            This command calculates <a href=\"https://en.wikipedia.org/wiki/Round-trip_delay\">Round-Trip Time</a> for your bot to the API. It does this by calculating response time samples, so you can tell if your bot is being slow or not.\r\n            <br><br>\r\n        </td>\r\n    </tr>\r\n</table>\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "discord is discord.py bot debug tools",
    "version": "1.0.2",
    "project_urls": null,
    "split_keywords": [
        "udo",
        " discord.py",
        " discord",
        " cog",
        " repl",
        " extension",
        " jishaku"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78e497dc18a6136d92547a747f34652742f7c35f28f3270873f91cecbbb1b2b9",
                "md5": "8a83d255cfc7e662f1802fb722e72902",
                "sha256": "91ce500c55eea52b016e2b6b831042fc5f3b03b68ebe8069ead4345ffc95ca84"
            },
            "downloads": -1,
            "filename": "udo.py-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a83d255cfc7e662f1802fb722e72902",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 42529,
            "upload_time": "2024-06-26T16:51:20",
            "upload_time_iso_8601": "2024-06-26T16:51:20.047021Z",
            "url": "https://files.pythonhosted.org/packages/78/e4/97dc18a6136d92547a747f34652742f7c35f28f3270873f91cecbbb1b2b9/udo.py-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a44691528b1648fae52a37dc7839bf2ab63cb002d66bded44d0aa0de05882cd",
                "md5": "2d963b07f9f6f2daca72004797c8797b",
                "sha256": "972c78b7806069ab135ea472d56ae52eb46509b40d544ddc98a08207cef544c7"
            },
            "downloads": -1,
            "filename": "udo_py-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2d963b07f9f6f2daca72004797c8797b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 36425,
            "upload_time": "2024-06-26T16:51:22",
            "upload_time_iso_8601": "2024-06-26T16:51:22.641548Z",
            "url": "https://files.pythonhosted.org/packages/6a/44/691528b1648fae52a37dc7839bf2ab63cb002d66bded44d0aa0de05882cd/udo_py-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-26 16:51:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "udo.py"
}
        
Elapsed time: 0.29221s