1. pathvalidate¶
1.1. Summary¶
pathvalidate is a Python library to sanitize/validate a string such as filenames/file-paths/etc.
1.2. Features¶
- Sanitize/Validate a string as a:
file name
file path
- Sanitize will do:
Remove invalid characters for a target platform
Replace reserved names for a target platform
Normalize
Remove unprintable characters
Argument validator/sanitizer for
argparse
andclick
- Multi platform support:
Linux
Windows
macOS
POSIX
: POSIX-compliant systems (Linux, macOS, etc.)universal
: platform independent
Multibyte character support
1.3. CLI tool¶
You can find this package’s command line interface tool at the pathvalidate-cli repository.
2. Installation¶
2.1. Installation: pip¶
pip install pathvalidate
2.2. Installation: conda¶
conda install conda-forge::pathvalidate
2.3. Installation: apt¶
sudo add-apt-repository ppa:thombashi/ppa
sudo apt update
sudo apt install python3-pathvalidate
3. Dependencies¶
Python 3.9+ no external dependencies.