Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 573 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 573 Bytes

asyncio-subprocess-run

This is asyncio drop-in replacement for subprocess.run, which is expected to be in asyncio.subprocess.run, but it isn't.

For documentation see https://docs.python.org/3/library/subprocess.html#subprocess.run

Install

pip3 install asyncio-subprocess-run

Usage

from asyncio_subprocess_run import run


async def get_uid():
    return int(
        (await run(['id', '-u'], check=True, text=True, capture_output=True))
        .stdout.strip())