aiocmdline


Nameaiocmdline JSON
Version 2024.1.25 PyPI version JSON
download
home_page
SummaryPython class to build async-compatible line-oriented command interpreter
upload_time2024-01-28 08:31:28
maintainer
docs_urlNone
author
requires_python>=3.0
licensePermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords cmdline readline
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            aiocmdline
==========

Python has a builtin module that provides a line-oriented command interpreter.
However, the builtin module is difficult to use with async Python code. This
module provides a ready-to-use class that simplifies the implementation of
regular and async commands.

Dependencies:
-------------

 - aioreadline

Example
-------

```
class MyCmdline(AIOCmdline):
	def do_quit(self):
		self.stop_cmdloop()
	
	async def do_sleep(self, arg):
		await asyncio.sleep(int(arg))
		print("sleep done")

mycmdline = MyCmdline(prompt="mycmd> ", history=True)
mycmdline.cmdloop()
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "aiocmdline",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": "",
    "keywords": "cmdline,readline",
    "author": "",
    "author_email": "Mario Kicherer <dev@kicherer.org>",
    "download_url": "https://files.pythonhosted.org/packages/cb/ba/3d56ac5dee3399f35443ed001b569993c9ef340c6588c120fb7d9cc40b07/aiocmdline-2024.1.25.tar.gz",
    "platform": null,
    "description": "aiocmdline\n==========\n\nPython has a builtin module that provides a line-oriented command interpreter.\nHowever, the builtin module is difficult to use with async Python code. This\nmodule provides a ready-to-use class that simplifies the implementation of\nregular and async commands.\n\nDependencies:\n-------------\n\n - aioreadline\n\nExample\n-------\n\n```\nclass MyCmdline(AIOCmdline):\n\tdef do_quit(self):\n\t\tself.stop_cmdloop()\n\t\n\tasync def do_sleep(self, arg):\n\t\tawait asyncio.sleep(int(arg))\n\t\tprint(\"sleep done\")\n\nmycmdline = MyCmdline(prompt=\"mycmd> \", history=True)\nmycmdline.cmdloop()\n```\n",
    "bugtrack_url": null,
    "license": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Python class to build async-compatible line-oriented command interpreter",
    "version": "2024.1.25",
    "project_urls": {
        "Homepage": "https://github.com/anyc/aiocmdline/",
        "Issues": "https://github.com/anyc/aiocmdline/issues"
    },
    "split_keywords": [
        "cmdline",
        "readline"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c6620cb5c4dd7855568abf098e37095794414a16bcbb470f3b0a4e03c47ecc7",
                "md5": "d55062771ae4ec0a67c2201ba9690762",
                "sha256": "85aa96766082b9c0e3d3c76c28b662813aed3d7079479226ea0121baba18099a"
            },
            "downloads": -1,
            "filename": "aiocmdline-2024.1.25-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d55062771ae4ec0a67c2201ba9690762",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 4601,
            "upload_time": "2024-01-28T08:31:26",
            "upload_time_iso_8601": "2024-01-28T08:31:26.144558Z",
            "url": "https://files.pythonhosted.org/packages/5c/66/20cb5c4dd7855568abf098e37095794414a16bcbb470f3b0a4e03c47ecc7/aiocmdline-2024.1.25-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cbba3d56ac5dee3399f35443ed001b569993c9ef340c6588c120fb7d9cc40b07",
                "md5": "f9b9c7106b86ed3107aa9b2e6a4e3d81",
                "sha256": "5e72ff43de2042d9f951843a819822a4e337daddd0e5ee002473bbb3cd507d3b"
            },
            "downloads": -1,
            "filename": "aiocmdline-2024.1.25.tar.gz",
            "has_sig": false,
            "md5_digest": "f9b9c7106b86ed3107aa9b2e6a4e3d81",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 3518,
            "upload_time": "2024-01-28T08:31:28",
            "upload_time_iso_8601": "2024-01-28T08:31:28.108434Z",
            "url": "https://files.pythonhosted.org/packages/cb/ba/3d56ac5dee3399f35443ed001b569993c9ef340c6588c120fb7d9cc40b07/aiocmdline-2024.1.25.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-28 08:31:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "anyc",
    "github_project": "aiocmdline",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "aiocmdline"
}
        
Elapsed time: 0.29364s