dev-python/
pathvalidate

A Python library to sanitize/validate a string such as filenames/file-paths/etc

https://github.com/thombashi/pathvalidate/