Proclib is a high level wrapper/abstraction around the standard library subprocess module, written in Python, with proper piping support which aims to simplify the usage of Unix utilities right from Python and help the developer focus on the commands and not the code which calls the commands.
Overview
- proclib.api.spawn(cmd)
Given a string or list making up commands cmd, return a Response object which is the result of piping the commands, i.e. they are run in parallel. The data parameter can be used to configure the data passed in to the initial process. Usage example:
>>> from proclib.api import spawn >>> r = spawn('yes | head') >>> r.stdout.read() 'y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n' >>> r.close() >>> r.history[0].explain_signal() {'action': 'kill', 'description': 'write on a pipe with no readers', 'id': 13, 'signal': 'SIGPIPE'}Streaming support is built-in- that is that the stdout of any process can be streamed lazily instead of read and stored in memory all in one go. Also, any kind of iterable can be piped to the process:
def gen(): yield 'hi\n' yield 'ho\n' r = spawn('cat', data=gen()) assert r.out.split() == ['hi', 'ho']
Metadata
Release files for proclib 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| proclib-0.1.3.tar.gz | 6.1 kB | Without provenance | Details for proclib-0.1.3.tar.gz |
Release files / proclib-0.1.3.tar.gz
| Download URL | proclib-0.1.3.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d88a7b6be7d8929ec6300b696b676772a689416eb9db4197d8e027512f80dc8
|
|
BLAKE2b-256 checksum How to use checksums |
a0d65cf26c10c074b6d452ca8362781f9853407cccc8b2c769cea386a8dd79fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for proclib 0.1.3
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.