Uniquify - get unique, short and easy-to-read names and paths
Examples
Shorten names/paths by extracting non-common parts:
>>> from uniquify import shortname, shortpath >>> shortname(['__common_part___abc___common_part__', ... '__common_part___xbc___common_part__', ... '__common_part___xyz___common_part__']) ['abc', 'xbc', 'xyz'] >>> shortpath(['some/long/path/___/alpha/___/___/', ... 'some/long/path/___/beta/___/___/', ... 'some/long/path/___/gamma/___/___/']) ['alpha', 'beta', 'gamma']
Convert common parts into skip marks:
>>> from uniquify import skipcommonname, skipcommonpath >>> skipcommonname(['ab__common_part___c', ... 'ij__common_part___k', ... 'xy__common_part___z']) ['ab...c', 'ij...k', 'xy...z'] >>> skipcommonpath(['alpha/common/path/beta', ... 'epsilon/common/path/delta', ... 'phi/common/path/psi']) ['alpha/.../beta', 'epsilon/.../delta', 'phi/.../psi']
Install
Install it from pypi
pip install uniquify # easy_install uniquify
Metadata
Release files for uniquify 0.0.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 | |
|---|---|---|---|---|
| uniquify-0.0.1.tar.gz | 5.2 kB | Without provenance | Details |
Release files / uniquify-0.0.1.tar.gz
| Download URL | uniquify-0.0.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47e748763aee852f9363a2f7ad759e157b829c6ee6cdb86f78f6a6507f58fb95
|
|
BLAKE2b-256 checksum How to use checksums |
2e70f54766f67bcb26fb4d9274d35f5424533c8f8a908a296f16c93445baf7ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for uniquify 0.0.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.