GDS Model

Note

The GDS Model is used to represent the SDMX Global Discovery Service (GDS) objects in a structured way.

Models for GDS data.

This module defines classes for representing GDS-specific data, such as agencies, in the SDMX data model.

class pysdmx.model.gds.GdsCatalog(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, version: str = '1.0', valid_from: datetime | None = None, valid_to: datetime | None = None, is_final: bool = False, is_external_reference: bool = False, service_url: str | None = None, structure_url: str | None = None, agency: str | Agency = '', *, annotations: Sequence[Annotation] = (), services: List[GdsService | GdsServiceReference] | None = None, endpoints: List[GdsEndpoint] | None = None)

Represents a GDS catalog.

agency

The AgencyID of the catalog’s owner.

id

The ID of the catalog.

urn

The URN of the catalog.

version

The version of the catalog.

services

Optional list of GdsService or GdsServiceReference,

depending on the references parameter, that are associated with the
catalog.
endpoints

List of GDS endpoints available at the catalog.

class pysdmx.model.gds.GdsEndpoint(api_version: str, url: str, comments: str, message_formats: List[str], rest_resources: List[str])

Represents a GDS endpoint.

api_version

The API version of the endpoint.

url

The URL of the endpoint.

comments

Comments about the endpoint.

message_formats

List of message formats supported by the endpoint.

rest_resources

List of REST resources available at the endpoint.

class pysdmx.model.gds.GdsSdmxApi(release: str, description: str)

Represents an SDMX API version.

release

The release version of the SDMX API.

description

A description of the release.

class pysdmx.model.gds.GdsService(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, version: str = '1.0', valid_from: datetime | None = None, valid_to: datetime | None = None, is_final: bool = False, is_external_reference: bool = False, service_url: str | None = None, structure_url: str | None = None, agency: str | Agency = '', *, annotations: Sequence[Annotation] = (), base: str, endpoints: List[GdsEndpoint], authentication: str | None = None)

Represents a GDS service.

agency

The AgencyID of the service’s owner.

base

The base URL of the service.

endpoints

List of GDS endpoints available at the service.

authentication

Optional authentication method for the service.

class pysdmx.model.gds.GdsServiceReference(id: str, name: str, urn: str, service: str, description: str | None = None)

Represents a GDS service reference.

id

The ID of the service reference.

name

The name of the service reference.

urn

The URN of the service reference.

service

The service associated with the reference.

description

An optional description of the service reference.

property short_urn: str

Returns a short URN for the ServiceReference.

class pysdmx.model.gds.GdsUrnResolver(agency: str, resource_id: str, version: str, sdmx_type: str, resolver_results: List[ResolverResult])

Represents the response for a URN resolver query.

agency

The agency maintaining the resource.

resource_id

The ID of the resource.

version

The version of the resource.

sdmx_type

The type of SDMX resource.

resolver_results

A list of resolver results.

class pysdmx.model.gds.ResolverResult(api_version: str, query: str, status_code: int)

Represents a single resolver result.

api_version

The API version of the resolver result.

query

The query URL for the resource.

status_code

The HTTP response code for the query.