Pyng
Pyng is a collection of Python utility functions I’ve written over the years, and that I keep wishing were available everywhere. Sadly, in many cases I’ve simply pasted copies of individual functions as needed. But no more!
It’s organized as follows:
commands: decorator to automatically build an argparse.ArgumentParser by decorating functions you want to expose as script subcommands
dicts: dict subsets, dict searching
exc: manipulate exceptions, e.g. reraise, retry
genio: generator-based file I/O, loosely related to Java file streams
graph: filter DAG represented as dict of (key, otherkeys)
iters: generic iterator functionality, akin to itertools
out: construct a file-like output object to wrap a specified sink function, with buffer_lines as a useful example and syslogger as a practical use case
relwalk: os.walk() filtered to produce pathnames relative to the starting directory
replacefile: filter a text file in-place
timing: time-related utilities, e.g. duration() to produce a human-friendly description of a specified interval and ProgressTimer to abstract ETA computations
tk: Tkinter utilities, e.g. prompt for a single password or construct a prompt dialog from (description, type) tuples
toposort: topological sort of DAG represented as dict of (key, otherkeys)
In addition…
ProgressBar provides experimental progress-bar support for a long- running console script, from self-overwriting console messages through wxPython, zenity, Tkinter. This is very much a work in progress, though functional subsets have been successfully used.
Please see the individual docstrings for more information.
Metadata
Release files for Pyng 1.6.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 |
|---|---|---|---|---|
| pyng-1.6.3.tar.gz | 108.1 kB | Without provenance | Details for pyng-1.6.3.tar.gz |
Release files / pyng-1.6.3.tar.gz
| Download URL | pyng-1.6.3.tar.gz |
|---|---|
| Size | 108.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67937778f65c14924d008bfa0492cf4cee270e04b19ca0e77bbf8fd088a62dd8
|
|
BLAKE2b-256 checksum How to use checksums |
b38061d512b0dd4fc756bfcc1d7367053cba03a322e1b6805d51cde2df498676
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for Pyng 1.6.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.