Summary
pathvalidate-cli is a command line interface for pathvalidate library. The tool can sanitize/validate strings such as file-names/file-paths.
Installation
pip install pathvalidate-cli
Usage
Sanitize file paths
$ pathvalidate sanitize 'fi:l*e/p"a?t>h|.t<xt' file/path.txt $ pathvalidate --filename sanitize 'fi:l*e/p"a?t>h|.t<xt' filepath.txt
Validate file paths
$ pathvalidate validate file/path.txt
$
$ pathvalidate validate 'fi:l*e/p"a?t>h|.t<xt'
[PV1100] invalid characters found: invalids=(':', '*', '"', '?', '>', '|', '<'), value='fi:l*e/p"a?t>h|.t<xt', platform=Windows
Command Help
Usage: pathvalidate [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
--debug For debug print.
-q, --quiet Suppress execution log messages.
--filename Consider inputs as filenames.
--max-len, --max-bytes BYTES Maximum byte counts of file paths. -1: same
value as the platform limitation. [default:
-1]
--platform PLATFORM Target platform name (case-insensitive). Valid
platform specifiers are Linux/Windows/macOS.
Valid special values are: auto, universal,
POSIX (a) auto: automatically detects the
execution platform. (b) universal: platform
independent. (c) POSIX: POSIX-compliant
platform. [default: universal]
-v, --verbose Verbosity level [default: 0]
-h, --help Show this message and exit.
Commands:
error Print error reasons.
sanitize Sanitize file paths.
validate Validate file paths.
Usage: pathvalidate validate [OPTIONS] [FILEPATHS]...
Validate file paths.
Options:
--min-len, --min-bytes BYTES Minimum byte counts of file paths. [default:
1]
--no-check-reserved TEXT Disable reserved name check.
-h, --help Show this message and exit.
Usage: pathvalidate sanitize [OPTIONS] [FILEPATHS]...
Sanitize file paths.
Options:
--replacement-text TEXT Replacement text for invalid characters. Defaults
to an empty string (remove invalid strings).
[default: ""]
--normalize Normalize the path.
--validate-after-sanitize Execute validation after sanitization.
-h, --help Show this message and exit.
Dependencies
Python 3.9+
Metadata
Release files for pathvalidate-cli 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pathvalidate_cli-0.2.1.tar.gz | 12.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pathvalidate_cli-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / pathvalidate_cli-0.2.1.tar.gz
| Download URL | pathvalidate_cli-0.2.1.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9998f4379d29ff65de4808a8a0e6ef75d94a1e6e40659ff984fa50ba0eb90b80
|
|
BLAKE2b-256 checksum How to use checksums |
ee44da50d316972f3529feda970df1edba8b778b38abb4765c4f314db56bfba7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2025.
Transparency logRelease files / pathvalidate_cli-0.2.1-py3-none-any.whl
| Download URL | pathvalidate_cli-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1d09ec1f71a00a7bcd92662d4f4eec079f8b4d3bd37dd06cbed824b1ceb9b00
|
|
BLAKE2b-256 checksum How to use checksums |
58e431d5fb6d159ac7f68e3f763ba43109c9a1697689d1f0bdba751a6e3ec1ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2025.
Transparency log