pathvalidate (pypi): pathvalidate is a Python library to sanitize/validate a string such as filenames/file-paths/etc.
Keywords: file|path|validation|validator|sanitization|sanitizer|filename|filepath|lint|python-library