privex.helpers.converters

Various functions/classes which convert/parse objects from one type into another.

Copyright:

    +===================================================+
    |                 © 2019 Privex Inc.                |
    |               https://www.privex.io               |
    +===================================================+
    |                                                   |
    |        Originally Developed by Privex Inc.        |
    |        License: X11 / MIT                         |
    |                                                   |
    |        Core Developer(s):                         |
    |                                                   |
    |          (+)  Chris (@someguy123) [Privex]        |
    |          (+)  Kale (@kryogenic) [Privex]          |
    |                                                   |
    +===================================================+

Copyright 2019     Privex Inc.   ( https://www.privex.io )

Functions

convert_bool_int(d[, if_empty, fail_empty])

Convert a boolean d into an integer (0 for False, 1 for True)

convert_datetime(d[, if_empty, fail_empty])

Convert the object d into a datetime.datetime object.

convert_int_bool(d[, if_empty, fail_empty])

Convert an integer d into a boolean (0 for False, 1 for True)

convert_unixtime_datetime(d[, if_empty, …])

Convert a unix timestamp into a datetime.datetime object