Python flask_restful.fields.DateTime() Examples
The following are 4
code examples of flask_restful.fields.DateTime().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
flask_restful.fields
, or try the search function
.
Example #1
Source File: gateway.py From floranet with MIT License | 6 votes |
def __init__(self, **kwargs): self.restapi = kwargs['restapi'] self.server = kwargs['server'] self.fields = { 'host': fields.String, 'eui': fields.Integer, 'name': fields.String, 'enabled': fields.Boolean, 'power': fields.Integer, 'created': fields.DateTime(dt_format='iso8601'), 'updated': fields.DateTime(dt_format='iso8601') } self.parser = reqparse.RequestParser(bundle_errors=True) self.parser.add_argument('host', type=str) self.parser.add_argument('eui', type=int) self.parser.add_argument('name', type=str) self.parser.add_argument('enabled', type=inputs.boolean) self.parser.add_argument('power', type=int) self.args = self.parser.parse_args()
Example #2
Source File: appproperty.py From floranet with MIT License | 6 votes |
def __init__(self, **kwargs): self.restapi = kwargs['restapi'] self.server = kwargs['server'] self.fields = { 'port': fields.Integer, 'name': fields.String, 'type': fields.String, 'created': fields.DateTime(dt_format='iso8601'), 'updated': fields.DateTime(dt_format='iso8601') } self.parser = reqparse.RequestParser(bundle_errors=True) self.parser.add_argument('appeui', type=int) self.parser.add_argument('port', type=int) self.parser.add_argument('name', type=str) self.parser.add_argument('type', type=str) self.args = self.parser.parse_args()
Example #3
Source File: device.py From floranet with MIT License | 5 votes |
def __init__(self, **kwargs): self.restapi = kwargs['restapi'] self.server = kwargs['server'] self.fields = { 'deveui': fields.Integer, 'name': fields.String, 'devclass': fields.String, 'enabled': fields.Boolean, 'otaa': fields.Boolean, 'devaddr': fields.Integer, 'appeui': fields.Integer, 'appskey': fields.Integer, 'nwkskey': fields.Integer, 'tx_datr': fields.String, 'snr_average': fields.Float, 'appname': fields.String, 'latitude': fields.Float, 'longitude': fields.Float, 'created': fields.DateTime(dt_format='iso8601'), 'updated': fields.DateTime(dt_format='iso8601') } self.parser = reqparse.RequestParser(bundle_errors=True) self.parser.add_argument('deveui', type=int) self.parser.add_argument('name', type=str) self.parser.add_argument('devclass', type=str) self.parser.add_argument('enabled', type=inputs.boolean) self.parser.add_argument('otaa', type=inputs.boolean) self.parser.add_argument('devaddr', type=int) self.parser.add_argument('appeui', type=int) self.parser.add_argument('nwkskey', type=int) self.parser.add_argument('appskey', type=int) self.parser.add_argument('appname', type=str) self.parser.add_argument('latitude', type=float) self.parser.add_argument('longitude', type=float) self.args = self.parser.parse_args()
Example #4
Source File: application.py From floranet with MIT License | 5 votes |
def __init__(self, **kwargs): self.restapi = kwargs['restapi'] self.server = kwargs['server'] self.fields = { 'appeui': fields.Integer, 'name': fields.String, 'domain': fields.String, 'appnonce': fields.Integer, 'appkey': fields.Integer, 'fport': fields.Integer, 'appinterface_id': fields.Integer, 'properties': {}, 'created': fields.DateTime(dt_format='iso8601'), 'updated': fields.DateTime(dt_format='iso8601') } self.pfields = { 'port': fields.Integer, 'name': fields.String, 'type': fields.String, 'created': fields.DateTime(dt_format='iso8601'), 'updated': fields.DateTime(dt_format='iso8601') } self.parser = reqparse.RequestParser(bundle_errors=True) self.parser.add_argument('appeui', type=int) self.parser.add_argument('name', type=str) self.parser.add_argument('domain', type=str) self.parser.add_argument('appnonce', type=int) self.parser.add_argument('appkey', type=int) self.parser.add_argument('fport', type=int) self.parser.add_argument('interface', type=int) self.args = self.parser.parse_args()