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.0.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file betterpathlib-0.1.0.tar.gz
.
File metadata
- Download URL: betterpathlib-0.1.0.tar.gz
- Upload date:
- Size: 8.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 | 6be05a8a7082ecb7e6c98c644750aee47fdf47c055520b483749eff12c6ec41c |
|
MD5 | 1d2107f2f398c10f1ded5bc418b33eb0 |
|
BLAKE2b-256 | 0049ea439b7da8b150530f408850f3d27c685db29a4b32be731f5f772040cac4 |
File details
Details for the file betterpathlib-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: betterpathlib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 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 | 1f13d50407b84c83c6e7d219cb53fe57342b14a243793d6a75c635b6ac730a3d |
|
MD5 | ab7594638af326cebe778ba5d614d52c |
|
BLAKE2b-256 | bd3031130f1c6f196948b42e53156f1f8ec9745528294bdddd79dab4ba522b74 |