Skip to main content

A Path library that is a compatible extension to Python's built-in pathlib.Path.

Project description

PyPI version ReadTheDocs

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 - Requires requests and and allows for or_download()
  • similarpaths - Requires thefuzz and and allows for most_similar_paths()

Project details


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.9.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

betterpathlib-0.1.9-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file betterpathlib-0.1.9.tar.gz.

File metadata

  • Download URL: betterpathlib-0.1.9.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.5 Linux/6.11.8-300.fc41.x86_64

File hashes

Hashes for betterpathlib-0.1.9.tar.gz
Algorithm Hash digest
SHA256 8145ba4bc035d5d3c080127cda9e57205e788b17ca48828085236b1b335ff254
MD5 834ff13a4ff5f9c2cb2b8f6e671ef599
BLAKE2b-256 e353b4884400b07c7d8671d665df9ea207dab5dc7038becffc424e7b892a7510

See more details on using hashes here.

File details

Details for the file betterpathlib-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: betterpathlib-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.5 Linux/6.11.8-300.fc41.x86_64

File hashes

Hashes for betterpathlib-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d7c5ab8581c3d63712a61950699499548ec01b1fdd664f98fad2e921ec0ed32b
MD5 a87729853a73bb0f285387ba9587a5b8
BLAKE2b-256 20cbe277a7df379af0ef83c8587fbb0b0f95ae0958565bf5a1427cf80d40b570

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page