tron.api.requestargs module¶
Functions for returning validated values from a twisted.web.Request object.
- tron.api.requestargs.get_bool(request, key, default=None)¶
Returns True if the key exists and is truthy in the request args.
- tron.api.requestargs.get_datetime(request, key)¶
Returns the first value in the request args for a given key. Casts to a datetime. Returns None if the value cannot be converted to datetime.
- tron.api.requestargs.get_integer(request, key)¶
Returns the first value in the request args for the given key, if that value is an integer. Otherwise returns None.
- tron.api.requestargs.get_string(request, key)¶
Returns the first value in the request args for a given key.