Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

daak-0.1.1-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page