Skip to content

rarebreed/daak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python asynchronous subprocess launcher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages