Metadata-Version: 2.1
Name: info-check-toolkits
Version: 0.0.5
Summary: a set of toolkits for checking a dictionary with String values
Author: alicedyd
Author-email: alicedyd <xjw20020626@126.com>
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# Info Check Toolkits
__Check a dictionary with String values__ 


### Probelms
_Contains the result of the check_
* problem_type: empty value or invalid value
* column: which column do the problem occur
* msg: detail about the problem

### Limits
_Currently support four limits_
* num_limit(int): a certain limit of the length of the value
* no_space(bool): control whether space can be used in value
* is_date(bool): control whether the value has a format of YYYYMMDD
* value_range(List): a list of value in which value can be choosen

_Default options_
* num_limit: 0 (no limit)
* no_space: True (space can't be used)
* is_date: False
* value_range: [] (no limit)

### Processor
_Attributes_
* columns: a list of the columns of the dictionary
* limits: a dictionary from columns to Limit objects, store options for each column

_Method_
* check_row(row): check given dictionary with given limits, return a list of problems or None

### Usage
```
import info_check_toolkits as ICT

columns = ['name', 'age', 'sex']
limits = [
	ICT.Limit(num_limits=13),
	ICT.Limit(value_range=[str(i) for i in range(100)]),
	ICT.Limit(num_limit=1, value_range=('M', 'F'))
]

processor = ICT.Processor(columns, limits)

result = ICT.processor.check_row(row)
```
