Catalog PyPI
PACKAGE EXPLORERView in registry

aiocmdline

PyPI

Python class to build async-compatible line-oriented command interpreter

cmdlinereadline
Versions collected1
Direct dependencies1From release 2024.1.25
Last observed21 Oct, 11:44 UTC

README

Version 2024.1.25 documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
2024.1.2528 Jan 20241

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
anyc/aiocmdline

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:44 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:43717228f63b4c86f41bb02833e38fb7346fdf5a47f18c961e8ac7c5c582d2d2