magpie.helpers.sync_services

Module Contents

magpie.helpers.sync_services.is_valid_resource_schema(resources) → bool[source]

Returns True if the structure of the input dictionary is a tree of the form:

{
“resource_name_1”: {
“children”: {
“resource_name_3”: {“children”: {}}, “resource_name_4”: {“children”: {}}

}

} “resource_name_2”: {“children”: {}}

}

class magpie.helpers.sync_services.SyncServiceInterface(service_name, url)[source]

Bases: six.with_metaclass()

sync_type :Str[source]
max_depth[source]

The max depth at which remote resources are fetched.

get_resources(self)[source]

This is the function actually fetching the data from the remote service. Implement this for every specific service.

Returns:The returned dictionary must be validated by ‘is_valid_resource_schema’
class magpie.helpers.sync_services.SyncServiceGeoserver[source]

Bases: magpie.helpers.sync_services.SyncServiceInterface

sync_type = geoserver-api[source]
max_depth[source]
get_resources(self)[source]
class magpie.helpers.sync_services.SyncServiceProjectAPI[source]

Bases: magpie.helpers.sync_services.SyncServiceInterface

sync_type = project-api[source]
max_depth[source]
get_resources(self)[source]
class magpie.helpers.sync_services.SyncServiceThredds[source]

Bases: magpie.helpers.sync_services.SyncServiceInterface

sync_type = thredds[source]
max_depth[source]
static _resource_id(resource)[source]
get_resources(self)[source]
class magpie.helpers.sync_services.SyncServiceDefault[source]

Bases: magpie.helpers.sync_services.SyncServiceInterface

max_depth[source]
get_resources(self)[source]
magpie.helpers.sync_services.SYNC_SERVICES_TYPES :Dict[Str, Type[SyncServiceInterface]][source]