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.4.tar.gz
(8.9 kB
view details)
Built Distribution
File details
Details for the file betterpathlib-0.1.4.tar.gz
.
File metadata
- Download URL: betterpathlib-0.1.4.tar.gz
- Upload date:
- Size: 8.9 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 | c97135dbf97756eba762db9ea4429869d36ae78f43dd7a2f0e5bcf020a229891 |
|
MD5 | 0f5d87763319a98b06fc997529ff9337 |
|
BLAKE2b-256 | 28a98f70cfe1c5641dbd6c1c7850b038647202bd683f2b9886a67ecfacb2c624 |
File details
Details for the file betterpathlib-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: betterpathlib-0.1.4-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 | f8204c39d65276cf5c0ce100bf852b552c15616730fc4eff4126f60d5c941381 |
|
MD5 | ecca4a5a14053cf00d95c7b0f9088b56 |
|
BLAKE2b-256 | 7ed785171c44f707d61387e68248c1ea49829cc46211a5c154ef92e1ca11cfd6 |