isogeo_pysdk.api.routes_catalog module

Isogeo API v1 - API Routes for Catalogs entities

See: http://help.isogeo.com/api/complete/index.html

class isogeo_pysdk.api.routes_catalog.ApiCatalog(api_client=None)[source]

Bases: object

Routes as methods of Isogeo API used to manipulate catalogs.

associate_metadata(metadata: isogeo_pysdk.models.metadata.Metadata, catalog: isogeo_pysdk.models.catalog.Catalog) → requests.models.Response[source]

Associate a metadata with a catalog.

If the specified catalog is already associated, the response is still 204.

Parameters:
  • metadata (Metadata) – metadata object to update
  • catalog (Catalog) – catalog model object to associate
Example:
>>> isogeo.catalog.associate_metadata(
    isogeo.metadata.get(METADATA_UUID),
    isogeo.catalog.get(WORKGROUP_UUID, CATALOG_UUID)
    ))
<Response [204]>
create(workgroup_id: str, catalog: isogeo_pysdk.models.catalog.Catalog, check_exists: bool = 1) → isogeo_pysdk.models.catalog.Catalog[source]

Add a new catalog to a workgroup.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • catalog (class) – Catalog model object to create
  • check_exists (bool) –

    check if a catalog already exists into the workgroup:

    • 0 = no check
    • 1 = compare name [DEFAULT]
Returns:

the created catalog or False if a similar cataog already exists or a tuple with response error code

Return type:

Catalog

delete(workgroup_id: str, catalog_id: str)[source]

Delete a catalog from Isogeo database.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • catalog_id (str) – identifier of the resource to delete
dissociate_metadata(metadata: isogeo_pysdk.models.metadata.Metadata, catalog: isogeo_pysdk.models.catalog.Catalog) → requests.models.Response[source]

Removes the association between a metadata and a catalog.

If the specified catalog is not associated, the response is 404.

Parameters:
  • metadata (Metadata) – metadata object to update
  • catalog (Catalog) – catalog model object to associate
exists(workgroup_id: str, catalog_id: str) → bool[source]

Check if the specified catalog exists and is available for the authenticated user.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • catalog_id (str) – identifier of the catalog to verify
get[source]

Get details about a specific catalog.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • catalog_id (str) – catalog UUID
  • include (list) – additionnal subresource to include in the response
listing[source]

Get workgroup catalogs.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • include (tuple) – additionnal subresource to include in the response
  • caching (bool) – option to cache the response
metadata[source]

List metadata’s catalogs with complete information.

Parameters:metadata_id (str) – metadata UUID
Returns:the list of catalogs associated with the metadata
Return type:list
shares[source]

Returns shares for the specified catalog.

Parameters:catalog_id (str) – catalog UUID
Returns:list of Shares containing the catalog
Return type:list
statistics[source]

Returns statistics for the specified catalog.

Parameters:catalog_id (str) – catalog UUID
statistics_by_tag[source]

Returns statistics on a specific tag for the specified catalog.

Be careful: if an invalid character is present into the response (e.g. contact.name = ‘bureau GF-3A’), a ConnectionError / ReadTimeout will be raised.

Parameters:
  • catalog_id (str) – catalog UUID
  • tag (str) – tag name. Must be one of: catalog, coordinate-system, format, keyword:inspire-theme, keyword, owner
update(catalog: isogeo_pysdk.models.catalog.Catalog, caching: bool = 1) → isogeo_pysdk.models.catalog.Catalog[source]

Update a catalog owned by a workgroup.

Parameters:
  • catalog (class) – Catalog model object to update
  • caching (bool) – option to cache the response