semvec/pypi-packages huggingface dataset:
aiowhois 0.1.0
Python Asyncio WHOIS Protocol Client
License: MIT
Requires Python: >=3.6,<4.0

# aiowhois

[![image](https://img.shields.io/pypi/v/aiowhois.svg)](https://pypi.python.org/pypi/aiowhois)
[![image](https://img.shields.io/pypi/l/aiowhois.svg)](https://pypi.python.org/pypi/aiowhois)
[![image](https://img.shields.io/codecov/c/github/brunoalano/aiowhois/master.svg)](https://codecov.io/gh/brunoalano/aiowhois/branch/master)
[![aiowhois Build status](https://travis-ci.org/brunoalano/aiowhois.svg)](https://travis-ci.org/brunoalano/aiowhois)

Asyncio-based WHOIS supporting **legacy** and **RDAP** protocols.

```python
>>> import aiowhois

>>> resolv = aiowhois.Whois(timeout=10)
>>> parsed_whois = await resolv.query(my_domain)
```

## Why aiowhois?

TODO
json-simple-validator 1.0.1
A simple JSON validator for use in Flask projects. (Built in Python 3)
License: MIT
Keywords: flask json validation validator

## JSON Simple Validator

### About
This is a simple JSON validator built for and tested using Flask applications.


### Usage
To install the validator:

    pip install json-simple-validator

Sample usage of the validator:

```python
from json_simple_validator import field_validation


## Example Flask request
@app.route("/post", methods = ["POST"])
def post():
	validation_list = [
		{"field": "name"},
        {"field": "pass", "alias": "Password"},
        {"field": "number", "var_type": [int]}
	]

# 	validation_list = [
# 		# Each element is made up of the field that is being validated
# 		# and the alias of the field that is to be displayed, should there be an error

# 		# Sample dict:
# 		# {"name": "", e.g "first_name"
# 		# "alias[optional]": "", eg "First Name" If left out, title case of field name is used
# 		# "var_type[optional]": "", eg [str, bool, int]
# 		# "length[optional]": "[min, max(optional)]", eg [2, 10]
# 		# "special_rules": ""} eg ["email"] Only email is supported for now

	messages = fieldValidation(request.json, validation_list)

	if messages:
		return jsonify({"messages": messages}), 422

```

Post the following to the above endpoint:
```json
{
	"name": "",
	"pass": "",
	"number": "121231"
}
```

The following is returned:
```json
{
	"messages": [
        "Name is empty.",
        "Password is empty.",
        "Number data type is not of the expected data type."
    ]
}
```