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.2.tar.gz
(8.9 kB
view details)
Built Distribution
File details
Details for the file betterpathlib-0.1.2.tar.gz
.
File metadata
- Download URL: betterpathlib-0.1.2.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 | 421d4218f00f2c6c4921ec36073a401e06139c694bb95dad8c3f35b538bce125 |
|
MD5 | ac056625c31b3f9e460fa534c4f7c773 |
|
BLAKE2b-256 | 8a4246793f12bf08c209f7316325dadf71429ae24fa73fab5a04ccd42410cc96 |
File details
Details for the file betterpathlib-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: betterpathlib-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.2 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 | bb5b2cb1d3bf5378b52bf7641cd73133a1fd9d83868ef09b2f4a49c1951cbb6b |
|
MD5 | e41df672e5ada84cbaf68acfab204756 |
|
BLAKE2b-256 | cb22b7f2bad33f7921bd0cfd14bffcf8f9cb26a75a9ac3baaaa69bbcd76d0a0d |