Skip to main content

pathvalidate-cli is a command line interface for pathvalidate library.

Project description

Summary

pathvalidate-cli is a command line interface for pathvalidate library. The tool can sanitize/validate strings such as file-names/file-paths.

PyPI package version Supported Python versions CI status of Linux/macOS/Windows CodeQL

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]
  --security-check              Enable security checks.
  -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.

Dependencies

Python 3.8+

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

pathvalidate_cli-0.0.3.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

pathvalidate_cli-0.0.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pathvalidate_cli-0.0.3.tar.gz.

File metadata

  • Download URL: pathvalidate_cli-0.0.3.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for pathvalidate_cli-0.0.3.tar.gz
Algorithm Hash digest
SHA256 87f3f49ebe84db3774f94a55219296c66b3ba46417ad228051b9455d6ecf7ac1
MD5 cf08618e7b6a144eedb5d1c58dcbc0ef
BLAKE2b-256 c5fb42c47f49de25dbd2691dcc63640223401fe9bcad5dcab779191fdd343f69

See more details on using hashes here.

File details

Details for the file pathvalidate_cli-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pathvalidate_cli-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea9314ba2035ea1e300fb3944630ab2d8734f2d8ffb107786d9eba9725287fcd
MD5 743bf7e548fe6050006c5e6716074be7
BLAKE2b-256 37190a1717b6090e5ba0b3f17cc57b237d0e955793d5c10584c9fee11d1d3b8a

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