Metadata-Version: 2.1
Name: pathvalidate
Version: 0.23.0
Summary: A Python library to sanitize/validate a string such as filenames/file-paths/etc.
Home-page: https://github.com/thombashi/pathvalidate
Author: Tsuyoshi Hombashi
Author-email: tsuyoshi.hombashi@gmail.com
License: MIT License
Project-URL: Documentation, https://pathvalidate.rtfd.io/
Project-URL: Tracker, https://github.com/thombashi/pathvalidate/issues
Description: **pathvalidate**
        
        .. contents:: Table of Contents
           :depth: 2
        
        .. image:: https://badge.fury.io/py/pathvalidate.svg
            :target: https://badge.fury.io/py/pathvalidate
        
        .. image:: https://img.shields.io/pypi/pyversions/pathvalidate.svg
            :target: https://pypi.org/project/pathvalidate
        
        .. image:: https://img.shields.io/travis/thombashi/pathvalidate/master.svg?label=Linux/macOS
            :target: https://travis-ci.org/thombashi/pathvalidate
            :alt: Linux CI test status
        
        .. image:: https://img.shields.io/appveyor/ci/thombashi/pathvalidate/master.svg?label=Windows
            :target: https://ci.appveyor.com/project/thombashi/pathvalidate/branch/master
            :alt: Windows CI test status
        
        .. image:: https://coveralls.io/repos/github/thombashi/pathvalidate/badge.svg?branch=master
            :target: https://coveralls.io/github/thombashi/pathvalidate?branch=master
        
        .. image:: https://img.shields.io/github/stars/thombashi/pathvalidate.svg?style=social&label=Star
           :target: https://github.com/thombashi/pathvalidate
        
        Summary
        ---------
        A Python library to sanitize/validate a string such as filenames/file-paths/etc.
        
        Features
        ---------
        - Sanitize/Validate a string as a:
            - file name
            - file path
        - Multibyte character support
        
        Examples
        ==========
        Validate a filename
        ---------------------
        :Sample Code:
            .. code-block:: python
        
                from pathvalidate import validate_filename
        
                try:
                    validate_filename("\0_a*b:c<d>e%f/(g)h+i_0.txt")
                except ValueError:
                    print("invalid filename!")
        
        :Output:
            .. code-block::
        
                invalid filename!
        
        Sanitize a filename
        ---------------------
        :Sample Code:
            .. code-block:: python
        
                from pathvalidate import sanitize_filename
        
                fname = "fi:l*e/p\"a?t>h|.t<xt"
                print("{} -> {}".format(fname, sanitize_filename(fname)))
        
                fname = "\0_a*b:c<d>e%f/(g)h+i_0.txt"
                print("{} -> {}".format(fname, sanitize_filename(fname)))
        
        :Output:
            .. code-block::
        
                fi:l*e/p"a?t>h|.t<xt -> filepath.txt
                _a*b:c<d>e%f/(g)h+i_0.txt -> _abcde%f(g)h+i_0.txt
        
        Sanitize a filepath
        ---------------------
        :Sample Code:
            .. code-block:: python
        
                from pathvalidate import sanitize_filepath
        
                fpath = "fi:l*e/p\"a?t>h|.t<xt"
                print("{} -> {}".format(fpath, sanitize_filepath(fpath)))
        
                fpath = "\0_a*b:c<d>e%f/(g)h+i_0.txt"
                print("{} -> {}".format(fpath, sanitize_filepath(fpath)))
        
        :Output:
            .. code-block::
        
                fi:l*e/p"a?t>h|.t<xt -> file/path.txt
                _a*b:c<d>e%f/(g)h+i_0.txt -> _abcde%f/(g)h+i_0.txt
        
        For more information
        ----------------------
        More examples are available at 
        https://pathvalidate.rtfd.io/en/latest/pages/examples/index.html
        
        Installation
        ============
        
        ::
        
            pip install pathvalidate
        
        
        Dependencies
        ============
        Python 2.7+ or 3.4+
        No external dependencies.
        
        
        Test dependencies
        -----------------
        - `pytest <https://docs.pytest.org/en/latest/>`__
        - `pytest-runner <https://github.com/pytest-dev/pytest-runner>`__
        - `tox <https://testrun.org/tox/latest/>`__
        
        Documentation
        ===============
        https://pathvalidate.rtfd.io/
        
        
Keywords: file,path,validation,validator,sanitization,sanitizer
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: docs
Provides-Extra: release
Provides-Extra: test
Provides-Extra: build
