Description
pygnuutils is a pure python implementation for GNU utils.
Installation
Install the last released version using pip:
python3 -m pip install --user -U pygnuutils
Or install the latest version from sources:
git clone git@github.com:matan1008/pygnuutils.git
cd pygnuutils
python3 -m pip install --user -U -e .
Usage
CLI
You can run commands by using pygnuutils prefix. For example, in order to list /tmp/foo you can run:
pygnuutils ls -lRh /tmp/foo
Python
To use pygnuutils you can write the following:
from pygnuutils.ls import Ls
ls = Ls()
ls('/tmp', all_=True)
Perhaps the best reason to use this library instead of gnu is the dependency injection ability.
For example, in order to print a message each time a symlink is resolved:
import os
from pygnuutils.ls import Ls, LsStub
class ReadlinkWatch(LsStub):
def readlink(self, path, dir_fd=None):
print(f'Resolving {path}...')
return os.readlink(path, dir_fd=dir_fd)
ls = Ls(stub=ReadlinkWatch())
ls('/tmp', all_=True, long=True)
Metadata
Release files for pygnuutils 0.1.1
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 |
|---|---|---|---|---|
| pygnuutils-0.1.1.tar.gz | 61.7 kB | Without provenance | Details for pygnuutils-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygnuutils-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pygnuutils-0.1.1-py3-none-any.whl |
Total release size: 108.1 kB
Release files / pygnuutils-0.1.1.tar.gz
| Download URL | pygnuutils-0.1.1.tar.gz |
|---|---|
| Size | 61.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51ab4f27deb59102b7a04192f7585ff2b3a9de03739982f0b19d3cd4d16bea76
|
|
BLAKE2b-256 checksum How to use checksums |
03206a828fe03d6586241b824ee06c7da854ea351716006a62fd2548eaa5710b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / pygnuutils-0.1.1-py3-none-any.whl
| Download URL | pygnuutils-0.1.1-py3-none-any.whl |
|---|---|
| Size | 46.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b690540cc13f2c763250ee5cc647e9c81055d1002b1bcf7ac07ea6d259a21c5
|
|
BLAKE2b-256 checksum How to use checksums |
961758ee1f079114ea360601ccd331fd73032701abfe9278495e3dec0c35ef3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for pygnuutils 0.1.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.