Skip to main content

Nice formatting of paths

Project description

nice_path

A Python library for formatting a path in a nice way. If a path is relative to the users home directory it will rewrite it to use ~.

Examples

from nice_path import nice_path
from pathlib import Path

nice_path("/Users/<user>/.config/something") # "~/.config/something"

nice_path("/Users/<user>/") # "~"

nice_path("/tmp") # "/tmp"

nice_path(Path("/Users/<user>/Documents")) # "~/Documents"

License

This project is licensed under the MIT License.

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

nice_path-0.1.3.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

nice_path-0.1.3-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file nice_path-0.1.3.tar.gz.

File metadata

  • Download URL: nice_path-0.1.3.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nice_path-0.1.3.tar.gz
Algorithm Hash digest
SHA256 eaed2808d2ce9f2e93fff30776d686b9a30588fe70d44625aa4815a559b72eb4
MD5 b3d852d68e3173a6021a1c25d0512ec2
BLAKE2b-256 55fbab5e59758fcebca7617526cb37a3f90ee86816dc7b0c180de602fe8da1db

See more details on using hashes here.

File details

Details for the file nice_path-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: nice_path-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nice_path-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 52216e7f86c502f867ebf50f93a629aca599ac6ad44dd2a37d516df357b169b3
MD5 116fca371a61a3851ecfe7fb1c00daa0
BLAKE2b-256 65c8330c6571d2d9562ffcd20cb334f8bd6e7ca6520edcb811259dfc174b1ac0

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