Skip to main content
# function_validator
Function Validator library comes with a req_validator decorator that validates the function keyword argument against its datatype, keyword name, required and logs the keyerror that you provide in the error description.



Installation Instruction!
===================

>- Activate your Virtual Environment.
>- pip install function-validator

----------

**function-validator** is library having req_validator decorator that validates the request parameters.

# Usage

1. Import function logger library
- `from function_validator import req_validator`

# Example

```python
from function_validator import req_validator

@req_validator(param_name="age", err_description="int not found", req=True, var_type=int)
@req_validator(param_name="name", err_description="string not found", req=True, var_type=basestring)
@req_validator(param_name="quality", err_description="dict not found", req=True, var_type=dict)
@req_validator(param_name="friend_list", err_description="list not found", req=True, var_type=list)
def test_function(**kwargs):
print kwargs


if __name__ == '__main__':
test_function(age = 23, name = "Anand", quality = {"height": 172}, friend_list = ["anand"])
```

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

function_validator-0.1.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file function_validator-0.1.tar.gz.

File metadata

File hashes

Hashes for function_validator-0.1.tar.gz
Algorithm Hash digest
SHA256 0c2bd2a105f15c7d60ab94cf89f831af5c3cbd289fb921dbc2fec9f6dc48987c
MD5 5b00ef46a1ab15ba3fbe13e45edc3fac
BLAKE2b-256 e653263da09d33110624e54f5cf84282cbb16aae549c4703bdca08f1bf68960a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1 This release

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page