webdb.typehandling¶
webdb.typehandling.date_and_time¶
This module provides classes that can be used to handle date/time/datetime
objects with the JSON api. All adapters inherite from the coresponding
datetime class and add the from_dict staticmethod and the to_dict
method.
-
exception
webdb.typehandling.date_and_time.ConversionException¶
-
class
webdb.typehandling.date_and_time.DateAdapter¶ Subclass of datetime.date.
-
static
copy(date)¶ Copy a date instance and construct a new DateAdapter.
-
static
webdb.typehandling.typehandling¶
Provides functions for converting types that are returned by the backend (for instance pymysql) to types that can be sent to the client.
-
webdb.typehandling.typehandling.handle_type(value)¶ Handle types coming from the client, convert the values in an appropiate manner and return them.
raises ConversionException on failure.
-
webdb.typehandling.typehandling.handle_types(dct)¶ Handles all types in a dict. Uses
handle_typeinternally.
-
webdb.typehandling.typehandling.reverse_handle_type(value)¶ Handles types coming from a client.