An extendable class that converts strings to object types.
pip install stringcoercion==0.0.0.2
StringCoercion interprets values typed into the console (or similar text-input) as fields for objects or parameters for functions via PEP484 style reflection.
Object fields or method parameters are reflected and an interpreter generated for each field or parameter.
For instance an int
field is simply interpreted using int(text)
.
Please see the Editorium project for the GUI equivalent.
int
str
Optional
bool
Enum
Flags
List
or Tuple
Password