loaders ยป boolean

boolean() โ†’ boolean
boolean_items() โ†’ list
boolean_list() โ†’ list

Accepts true, false, yes and no, returns a boolean (or raises an error for invalid values).

enoenabled: true
publish: no
visible: not
python>>> document = Eno.parse(input)

>>> document.boolean('enabled')
True
>>> document.boolean('publish')
False
>>> document.boolean('visible')
ValidationError: 'visible' must contain a boolean - allowed values are 'true', 'false', 'yes' and 'no'.