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.1.tar.gz
(8.7 kB
view details)
Built Distribution
File details
Details for the file betterpathlib-0.1.1.tar.gz
.
File metadata
- Download URL: betterpathlib-0.1.1.tar.gz
- Upload date:
- Size: 8.7 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 | fd6cb772bb393c0419ddd28e580a512862c3c3ceaa33aaeb0c348996571b658f |
|
MD5 | cc092cea4c0cd45a3ae07df9192639bc |
|
BLAKE2b-256 | 84565974212361011b70f92dca960d7d28a22c63232d9a1f04773d1a662c2964 |
File details
Details for the file betterpathlib-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: betterpathlib-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.1 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 | e4259e2afc1acb40c38b34b108b60c41c5e94d781cf8318113cda914d9bcbc3b |
|
MD5 | f1f6e651a04c150ae9976fa0c82e4b45 |
|
BLAKE2b-256 | 7ccdb72a8ed4ffd19f72f7a45347603d53decf13fddc9de9356bc446f5cf8b1f |