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.0.9.tar.gz
(7.5 kB
view details)
Built Distribution
File details
Details for the file betterpathlib-0.0.9.tar.gz
.
File metadata
- Download URL: betterpathlib-0.0.9.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.10.11-200.fc40.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03eb2724a037ba10b2fcffa905355edf1776fc9de39119b4c2302fc9960e7150 |
|
MD5 | e0e811ac88c4198cf991a2ae26027318 |
|
BLAKE2b-256 | 7420343773f3d1dab14f8a24b5e6703b9455cdccd7b17393f7316fc2be607f14 |
File details
Details for the file betterpathlib-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: betterpathlib-0.0.9-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.10.11-200.fc40.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2007b608aad984b13ff810d0a264cde90f07c8fefcab405a9ee845154c0a448d |
|
MD5 | fda4fff5f9bed3c73490ca1a036b04a4 |
|
BLAKE2b-256 | b77d7f1acc73091d525d0d4f50ab7d1e5541d19d6675d07823550c0728451490 |