Skip to main content

yaclipy-tools

An extensible, asyncio interface to subprocesses, plus a set of wrappers around common system tools that works well with yaclipy

Tools

  • curl
  • docker
  • ffmpeg
  • firebase
  • gcloud
  • git
  • gpg
  • graphviz
  • grep
  • kubectl
  • md5
  • nginx
  • openssl
  • shasum

The set of tools can easily be extended by subclassing SysTool

ProcTask

This creates an asynchronous connection to a sub-process. It is based upon loop.subprocess_exec().

await ProcTask('diff', 'README.md', 'README.md') 0

For more complicated interactions, plugins are used.

await ProcTask.using(Lines(1))('ls', '-al') [...]

The Lines plugin captured stdout (1) and return a list of lines. If no plugins want to return a value then the default behavior is to return the returncode as seen in the above example. If multiple plugins want to return a value then they are returned as a tuple:

await ProcTask.using(Lines, Lines(2))('ls', '-al') ([...], [...])

The first value of the tuple contains the lines from stdout AND stderr, whereas the second list only contains stderr lines.

Echo

The Echo plugin prints to the print_ext Printer(). By setting the context you can create nice, grouped command output.

Lines

Capture the output and return a list of strings

OneLine

Capture the output but only return one of the lines

Input

Send data to stdin of the process

Log

Capture the output and send it to a file (or other io.Stream)

Watch

Ask for the output to be captured so that you can use it asynchronously.

SysTool

SysTool build upon ProcTask by integrating it with yaclipy and adding more user-facing features, such as:

  • configurable command location (no more environment variables)
  • Tool availability and version check.
  • Helpful info about how to install missing tools.

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install yaclipy-tools

License

yaclipy-tools is distributed under the terms of the MIT license.

Metadata

Release files for yaclipy-tools 0.10.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yaclipy-tools 0.10.1
File Size Uploaded Provenance
yaclipy_tools-0.10.1.tar.gz 23.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for yaclipy-tools 0.10.1
File Interpreter ABI Platform
yaclipy_tools-0.10.1-py3-none-any.whl Python 3 none any Details

Total release size: 51.9 kB

Release files / yaclipy_tools-0.10.1.tar.gz

Download URL yaclipy_tools-0.10.1.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
93ab90cce22d0f35a09632b568c40b8631ac999f7a847618f93b16fbbf8e77f7
BLAKE2b-256 checksum
How to use checksums
e94d087163f37a42d18c4d93464c528258e5b49458161ec93ff8865c7e92d808
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.23.0

Release files / yaclipy_tools-0.10.1-py3-none-any.whl

Download URL yaclipy_tools-0.10.1-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ced6fd76bb772e8c0f5ff41648b4baf4b899c6ffec4f47eb9668cc55350c62b
BLAKE2b-256 checksum
How to use checksums
253dbc4450d9dcdaf900b4f9931ee3bff21b4301cd96f9f94a74d2e1b122f5da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.23.0

Security for yaclipy-tools 0.10.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page