isogeo_pysdk.models.datasource module

Isogeo API v1 - Model of Datasource entity

See: http://help.isogeo.com/api/complete/index.html#definition-datasource

class isogeo_pysdk.models.datasource.Datasource(_created: list = None, _id: str = None, _modified: str = None, _tag: str = None, enabled: bool = None, lastSession: dict = None, location: str = None, name: str = None, resourceCount: int = None, sessions: list = None)[source]

Bases: object

Datasources are CSW client entry-points.

Example:
{
    '_created': '2019-05-17T13:56:56.6162418+00:00',
    '_id': '2c891ce8692146c4901115a4232b13a2',
    '_modified': '2019-05-17T13:57:50.4434219+00:00',
    '_tag': 'data-source:2c891ce8692146c4901115a4232b13a2',
    'enabled': True,
    'lastSession': {
        '_created': '2019-05-17T13:58:06.5165889+00:00',
        '_id': 'ea99c37d809c4b1b9b4f257326ad1975',
        '_modified': '2019-05-17T13:58:28.5554966+00:00',
        'status': 'failed'
        },
    'location': 'http://ogc.geo-ide.developpement-durable.gouv.fr/csw/all-harvestable',
    'name': 'TEST - CSW entrypoint (datasource)',
    'resourceCount': 0,
    'sessions': [
        {
            '_created': '2019-05-17T13:58:06.5165889+00:00',
            '_id': 'ea99c37d809c4b1b9b4f257326ad1975',
            '_modified': '2019-05-17T13:58:28.5554966+00:00',
            'status': 'failed'
        }]
}
attr_crea = {'location': <class 'str'>, 'name': <class 'str'>}
attr_map = {}
attr_types = {'_created': <class 'str'>, '_id': <class 'str'>, '_modified': <class 'str'>, '_tag': <class 'str'>, 'enabled': <class 'bool'>, 'lastSession': <class 'dict'>, 'location': <class 'str'>, 'name': <class 'str'>, 'resourceCount': <class 'bool'>, 'sessions': <class 'list'>}
enabled

Gets the enabled of this Datasource.

Returns:The enabled of this Datasource.
Return type:str
lastSession

Gets the lastSession of this Datasource.

Returns:The lastSession of this Datasource.
Return type:dict
location

Gets the location (URL) of this Datasource.

Returns:The location (URL) of this Datasource.
Return type:str
name

Gets the name of this Datasource.

Returns:The name of this Datasource.
Return type:str
resourceCount

Gets the resourceCount of this Datasource.

Returns:The resourceCount of this Datasource.
Return type:Workgroup
sessions

Gets the sessions of this Datasource.

Returns:The sessions of this Datasource.
Return type:Workgroup
to_dict() → dict[source]

Returns the model properties as a dict.

to_dict_creation() → dict[source]

Returns the model properties as a dict structured for creation purpose (POST)

to_str() → str[source]

Returns the string representation of the model.