No project description provided
Project description
gnar
Shred the gnar in Python by using (half) pipes!
Various shell builtins are implemented, allowing for piping commands together.
gnar.Pipeable can be implemented on an arbitrary class; this class only requires you to implement Pipeable.run that takes a single parameter.
Examples
"/some/dir" | ls | cat | sed(r"this", r"that")
The above example replaces all occurrences of this with that for all files in /some/dir. Since ls() returns a list, cat() and sed() operate on each file in the list.
Notice that both ls and cat can be used with out parenthesis; this is due to their constructors not requiring any parameters. Functions like sed, and others that require constructor parameters, must be called with parenthesis.
>>> "one:two:three:four" | cut([2,3], ":")
['two', 'three']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gnar-0.1.2.tar.gz.
File metadata
- Download URL: gnar-0.1.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef309f72fb0fe0a3bdbb5cd6a51259fb42317644ab75895ccee50a4d8947aa74
|
|
| MD5 |
95dd0c89f7d0d4a8aeb5960437f7c339
|
|
| BLAKE2b-256 |
a0ba8e4ef10160dc431f313252f006f35b05e843e63371ec80df02f671cb9cc1
|
File details
Details for the file gnar-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gnar-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89c0d1b3b0abc40216444d59462aae160e9fda94c279f46e949a31e2d9c580eb
|
|
| MD5 |
d049c72b03dc3bbdd94582828ca8d441
|
|
| BLAKE2b-256 |
388443ccac15e241b41228fa25f3e536c78870fb4ec91b524802113304975617
|