Skip to main content

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()

Release files for aiocmdline 2024.1.25

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiocmdline 2024.1.25
File Size Uploaded
aiocmdline-2024.1.25.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiocmdline 2024.1.25
File Interpreter ABI Platform
aiocmdline-2024.1.25-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / aiocmdline-2024.1.25.tar.gz

Download URL aiocmdline-2024.1.25.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5e72ff43de2042d9f951843a819822a4e337daddd0e5ee002473bbb3cd507d3b
BLAKE2b-256 checksum
How to use checksums
cbba3d56ac5dee3399f35443ed001b569993c9ef340c6588c120fb7d9cc40b07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / aiocmdline-2024.1.25-py3-none-any.whl

Download URL aiocmdline-2024.1.25-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85aa96766082b9c0e3d3c76c28b662813aed3d7079479226ea0121baba18099a
BLAKE2b-256 checksum
How to use checksums
5c6620cb5c4dd7855568abf098e37095794414a16bcbb470f3b0a4e03c47ecc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

2024.1.25 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page