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.3.tar.gz
(8.9 kB
view details)
Built Distribution
File details
Details for the file betterpathlib-0.1.3.tar.gz
.
File metadata
- Download URL: betterpathlib-0.1.3.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 | 0f235d96fb69e6c3318bd13a60fe7c0733ae76279b12cf4f571d6f7991283b80 |
|
MD5 | 8399f328e2a0cf3f736b502a21b72a53 |
|
BLAKE2b-256 | cf61b0c0d4a7d619022ec7081797e861f64ea1ef9325a909c69ef94447906dae |
File details
Details for the file betterpathlib-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: betterpathlib-0.1.3-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 | 9296a0ff957f198651bbcd8236ae981717ee5f1edd75e63755c191dbc2911f51 |
|
MD5 | cc7fe47df50da459eee108fb2a77dd23 |
|
BLAKE2b-256 | 87a84151d98cb8ba38b7b0715057a4a60bb83c7d732bcc018c9e5772929366a8 |