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

Uploaded Source

Built Distribution

betterpathlib-0.1.8-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: betterpathlib-0.1.8.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.3-200.fc40.x86_64

File hashes

Hashes for betterpathlib-0.1.8.tar.gz
Algorithm Hash digest
SHA256 e5b57e220b00b1e480cbf4ca2105267dd6ebb1f685ca6c7700219be0e40f1de7
MD5 445c2eb567f0819c27ed2d618596b3bd
BLAKE2b-256 4012cc86c7607c7d4059160a648380e7c0ac601f1f056fe3e0d86867797a7755

See more details on using hashes here.

File details

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

File metadata

  • Download URL: betterpathlib-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.5 Linux/6.11.3-200.fc40.x86_64

File hashes

Hashes for betterpathlib-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8257463491188e33eaba72e18c7294352d9804a4d78c523d989e6d4f4f30805d
MD5 48d3227895ddbe9f5fe005ad9b767dd9
BLAKE2b-256 c1d3238851b64d4b1352390657a142cc884486926a3b90ee37674a1f96e8de17

See more details on using hashes here.

Supported by

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