Asynchronous subprocess runner
Project description
daak
In the Tausug language, daak means to command or order. daak is a small pure python library that can execute a subprocess and grab the stdout and stderr asynchronously.
It has limited support for handling input, mostly for when a sudo password is expected.
Installation
Through pip
pip install daak
Usage
The main class to use is called Run
import asyncio
from daak.process import Run
def which(prog: str):
return Run("which", args=[prog]).run(throw=False)
async def main():
_, process = await which("poetry")
print(process.returncode)
if __name__ == "__main__":
with asyncio.Runner() as runner:
runner.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
daak-0.1.0.tar.gz
(7.0 kB
view hashes)
Built Distribution
daak-0.1.0-py3-none-any.whl
(8.8 kB
view hashes)