Maintenance client

Important

The maintenance client is still EXPERIMENTAL and its API is subject to change without warnings.

This is the client to be used for maintaining metadata in an SDMX Registry.

>>> from pysdmx.api.fmr.maintenance import RegistryMaintenanceClient
>>> cd = Code("A", name="Code A")
>>> cl = Codelist("CL_TEST", agency="TEST", name="Test CL", items=[cd])
>>> target = "https://registry.sdmx.org"
>>> client = RegistryMaintenanceClient(target, "user", "password")
>>> client.put_structures([cl])
class pysdmx.api.fmr.maintenance.RegistryMaintenanceClient(api_endpoint, user, password, pem=None, timeout=60.0)

EXPERIMENTAL: A client to update metadata in the FMR.

put_metadata_reports(reports, header=None, action=StructureAction.Replace)

EXPERIMENTAL: Upload SDMX metadata reports to the FMR.

This method is experimental and its interface or behavior may change without notice.

Parameters:
  • reports (Sequence[MetadataReport]) – A sequence of metadata reports to upload.

  • header (Optional[Header]) – Optional SDMX Header to include in the message. If not supplied, pysdmx will generate one for you.

  • action (StructureAction) – How to apply the changes in case of already existing structures.

Return type:

None

put_structures(artefacts, header=None, action=StructureAction.Replace)

EXPERIMENTAL: Upload SDMX structures to the FMR.

This method is experimental and its interface or behavior may change without notice.

Parameters:
  • artefacts (Sequence[MaintainableArtefact]) – The sequence of SDMX maintainable artefacts to upload.

  • header (Optional[Header]) – Optional SDMX Header to include in the message. If not supplied, pysdmx will generate one for you.

  • action (StructureAction) – How to apply the changes in case of already existing structures.

Return type:

None