A Path library that is an extension to Python's built-in pathlib.Path.
Project description
betterpathlib
An Path library that is an extension to Pythons built-in pathlib.Path.
pip install betterpathlib[all]
Especially useful for dealing with:
- paths with multiple suffixes, e.g. files of the sort
archive.tar.gz
. - paths with numerical suffixes, i.e. files of the sort
part.rar.001
.
... and in addition, adds methods for:
- Case-insensitive globbing
- Copying files and directories
- Reading JSON directly from Path object
- Downloading file from URL to destination, if the file is not already downloaded
- Atomic writes
- Random paths (with optional prefix and/or suffix)
Has no external dependencies if not installed with optional features.
Optional features
download
- Requiresrequests
and and allows foror_download()
similarpaths
- Requiresthefuzz
and and allows formost_similar_paths()
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
betterpathlib-0.1.5.tar.gz
(9.0 kB
view details)
Built Distribution
File details
Details for the file betterpathlib-0.1.5.tar.gz
.
File metadata
- Download URL: betterpathlib-0.1.5.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.10.12-200.fc40.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a32031965fb2421d112e2e4104016c49c54232ef8041d3d80c0cedaf9264c1 |
|
MD5 | f12d348ed0c6d7cf9fb9a8774c7f8f67 |
|
BLAKE2b-256 | 7256bb9b7cc7993331a9e3baf3ead15fe614e2d753850599077043abf1303c4d |
File details
Details for the file betterpathlib-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: betterpathlib-0.1.5-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.10.12-200.fc40.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec844ad8c5081b509aeb5eb26c9e104f2c31a15c8cf2db22c59fe1dc0739991 |
|
MD5 | b61696a4da11911ccc2d015b501fecab |
|
BLAKE2b-256 | 7c3ec38c235c72504d5b238f2657b941850301e064e429d5d67581eafcef73e4 |