Metadata-Version: 2.1
Name: verify_types
Version: 1.0.5
Summary: Lib to verify types of functions
Home-page: https://gitlab.com/victorhdcoelho/verify-types/
Author: Victor Coelho
Author-email: victorhdcoelho@gmail.com
License: UNKNOWN
Description: # Verify types
        
        Verifica a tipagem e os retornos das funções em python
        
        
        ## How works ?
        
        ~~~bash
        pip3 install verify-types
        ~~~
        
        ### After that how use ?
        
        To use in one method you only need the decorator validate_params
        
        ~~~python
        from verify_types import validate_params
        
        
        @validate_params
        def example(a: str, b: float) -> str:
        	return f"a: {b}"
        ~~~
        
        To this case is possible verify if the input and output is correct. If dont't
        match the types a ValueError will raise with correct type, actual type and path
        of an error.
        
        ### To use on all class's methods
        
        ~~~python
        from verify_types import validate_params, decorate_all_methods                  
                                                                                        
                                                                                        
        @decorate_all_methods(validate_params)                                          
        class TestA:                                                                    
            def __init__(self, a: str) -> None:                                         
                self.a = a                                                              
                                                                                        
            def print_a(self) -> None:                                                  
                print(self.a)                                                           
                                                                                        
            def concat_a(self, b: str) -> str:                                          
                return self.a + b                                                       
                                                                                        
            def run(self) -> None:                                                      
                self.print_a()                                                          
                print(self.concat_a("nossa"))                                           
                                                                                        
                                                                                        
        if __name__ == "__main__":                                                      
            test = TestA("Nossa")                                                       
            test.run()
        ~~~
        
        This will be decorate all class methods
        
        
        ## Observetion
        If you use the decorator You must use type hint or and error will raise.
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
