Welcome to EvArgs¶
“EvArgs” is a lightweight python module for easy expression parsing and value-casting, validating by rules, and it provide flexible configuration and custom validation method.
Github¶
The latest version and documentation may be found on GitHub. The Github URL is the following.
Install¶
$ pip install evargs
or
$ pip3 install evargs
Features and documentation¶
“EvArgs” provides the following features.
It can specify the condition or value-assignment using a simple expression. e.g. a=1;b>5
Evaluate assigned values. e.g evargs.evaluate(‘a’, 1)
Put values. It’s available to using put is without parsing the expression.
Value casting - str, int, float, complex…
Value validation - unsigned, number range, alphabet, regex, any other…
Applying Pre-processing method and Post-processing method.
Get assigned values.
Set default rule.
Make parameter’s description.
Other support methods for value-assignment.
And you can see detail features and usage in EvArgs documentation
Modules and Classes reference¶
The following is the documentation for the module and class. Github source
Usage¶
from evargs import EvArgs
evargs = EvArgs()
evargs.initialize({
'a': {'type': bool},
'b': {'type': int},
'c': {'type': float, 'default': 3.14},
'e': {'type': str}
})
evargs.parse('a=True;b=10;c=H2O')