Metadata-Version: 2.1
Name: userinput
Version: 1.0.13
Summary: Simple python package to handle cli user input.
Home-page: https://github.com/LucaCappelletti94/userinput
Author: Luca Cappelletti
Author-email: cappelletti.luca94@gmail.com
License: MIT
Description: userinput
        =========================================================================================
        |travis| |sonar_quality| |sonar_maintainability| |codacy| |code_climate_maintainability| |pip| |downloads|
        
        Simple python package to handle CLI user input.
        
        How do I install this package?
        ----------------------------------------------
        As usual, just download it using pip:
        
        .. code:: shell
        
            pip install userinput
        
        Tests Coverage
        ----------------------------------------------
        Since some software handling coverages sometimes
        get slightly different results, here's three of them:
        
        |coveralls| |sonar_coverage| |code_climate_coverage|
        
        
        Available validators
        ----------------------------------------------
        Some commonly used validators are available with the package.
        
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | Validator name    | Description                                                                                           |
        +===================+=======================================================================================================+
        | email             | Check if given input string is a valid email.                                                         |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | version_code      | Check if given input string is a valid version code.                                                  |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | url               | Check if given input string is a valid URL. Does not check if given URL is online.                    |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | human_bool        | Check if given input string is a human Boolean, such as "yes", "y", "true", "si", "no", "n", "false". |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | integer           | Check if given input string is a integer numeric value.                                               |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | positive_integer  | Check if given input string  is a positive integer numeric value.                                     |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | non_empty         | Check if given input string is not empty.                                                             |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | hostname          | Check if given input string is a reachable host name.                                                 |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | ip                | Check if given input string is a reachable IP address.                                                |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        
        Use them as follows:
        
        .. code:: python
        
            from userinput import userinput
        
            result = userinput(
                "my_label",
                validator="validator name goes here"
            )
        
        You can also chain validators.
        They will be called in the order you provide.
        
        .. code:: python
        
            from userinput import userinput
        
            result = userinput(
                "my_label",
                validator=[
                    "validator name goes here",
                    my_custom_validation_function
                ]
            )
        
        
        Available sanitizers
        -----------------------------------------------
        Some commonly used sanitizers are available with the package.
        
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | Validator name    | Description                                                                                           |
        +===================+=======================================================================================================+
        | human_bool        | Cast human Boolean specified above in validators to python Booleans.                                  |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        | strip             | Remove padding spaces and repeated spaces.                                                            |
        +-------------------+-------------------------------------------------------------------------------------------------------+
        
        Use them as follows:
        
        .. code:: python
        
            from userinput import userinput
        
            result = userinput(
                "my_label",
                sanitizer="sanitizer name goes here"
            )
        
        You can also chain sanitizers.
        They will be called in the order you provide.
        
        .. code:: python
        
            from userinput import userinput
        
            result = userinput(
                "my_label",
                sanitizer=[
                    "sanitizer name goes here",
                    my_custom_sanitification_function
                ]
            )
        
        
        .. |travis| image:: https://travis-ci.org/LucaCappelletti94/userinput.png
           :target: https://travis-ci.org/LucaCappelletti94/userinput
           :alt: Travis CI build
        
        .. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_userinput&metric=alert_status
            :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_userinput
            :alt: SonarCloud Quality
        
        .. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_userinput&metric=sqale_rating
            :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_userinput
            :alt: SonarCloud Maintainability
        
        .. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_userinput&metric=coverage
            :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_userinput
            :alt: SonarCloud Coverage
        
        .. |coveralls| image:: https://coveralls.io/repos/github/LucaCappelletti94/userinput/badge.svg?branch=master
            :target: https://coveralls.io/github/LucaCappelletti94/userinput?branch=master
            :alt: Coveralls Coverage
        
        .. |pip| image:: https://badge.fury.io/py/userinput.svg
            :target: https://badge.fury.io/py/userinput
            :alt: Pypi project
        
        .. |downloads| image:: https://pepy.tech/badge/userinput
            :target: https://pepy.tech/badge/userinput
            :alt: Pypi total project downloads 
        
        .. |codacy| image:: https://api.codacy.com/project/badge/Grade/df1695332ded416d81a9336f0e1b57bf
            :target: https://www.codacy.com/app/LucaCappelletti94/userinput?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=LucaCappelletti94/userinput&amp;utm_campaign=Badge_Grade
            :alt: Codacy Maintainability
        
        .. |code_climate_maintainability| image:: https://api.codeclimate.com/v1/badges/8fbcc84e7a8d83e3aa2a/maintainability
            :target: https://codeclimate.com/github/LucaCappelletti94/userinput/maintainability
            :alt: Maintainability
        
        .. |code_climate_coverage| image:: https://api.codeclimate.com/v1/badges/8fbcc84e7a8d83e3aa2a/test_coverage
            :target: https://codeclimate.com/github/LucaCappelletti94/userinput/test_coverage
            :alt: Code Climate Coverate
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Provides-Extra: test
