Unit 1: Introduction to pysdmx

In this unit, we'll introduce the versatility and overall usefulness of pysdmx. We'll also cover the main use cases pysdmx addresses.

What is pysdmx?

Pysdmx is a pragmatic and opinionated SDMX library written in Python. It focuses on simplicity, providing a subset of the SDMX functionalities without requiring advanced knowledge of SDMX.

pysdmx aspires to be a versatile SDMX toolbox for Python, covering a range of use cases.

SDMX metadata are very useful for documenting statistical processes. SDMX boasts a rich information model with various metadata types. These metadata can be leveraged to power diverse statistical processes, including data collection, validation, and mapping. For example, we can define the structure we expect for a data collection process and share it with the organizations providing data so that they know what to send.

However, metadata can do so much more than that; they can be "active" and drive various types of statistical processes.

pysdmx provides an opinionated implementation of a subset of the SDMX information model through Python classes. These classes enable the definition of APIs for statistical data processes.

Main use cases pysdmx addresses

Now that we have covered the usefulness of pysdmx, let's go over some of the main use cases pysdmx addresses. Pysdmx can be used to:

  • Build SDMX-REST queries and execute them against SDMX-REST compliant web service.
  • Read and write SDMX data based on pandas datasets.
  • Read SDMX structural metadata and reference metadata.
  • Represent the SDMX information model in python.
  • Validate data against its structure.
  • Map (transcode) data between structures.
  • Read SDMX data or metadata, from local file, from a URL, or from an SDMX API.
  • Read metadata from an SDMX Registry using either synchronous or asynchronous SDMX API calls.
  • Integrate with vtlengine to leverage SDMX data, metadata, and execute VTL expressions to perform validation and transformation operations.
  • Using metadata stored in an SDMX registry, automate process tasks.
  • For example, in a data reporting process, we may want to store data in folders organized by dataflows. In each dataflow folder, we want sub-folders by data providers. Access to folders should be granted via appropriate roles with access requests approved by the manager of the organizational unit owning the dataflow. All of this can be implemented using pysdmx and SDMX metadata.
  • For example, we want to create a physical data model for a dataflow defined in an SDMX registry.

Coming next

With a basic understanding of pysdmx, let's now go over steps required to install pysdmx and how to verify installation.

AI assistant

Need help finding something? I am an AI Assistant that's here to help!

Welcome to SDMX AI assistant

What are you looking for?

SDMX AI assistant

By using this AI-powered service ("Service"), you acknowledge and agree to the following:

This Service uses generative AI to assist with statistical analysis and research. While the Service strives to deliver useful information, the output ("Output") may contain inaccuracies, omissions, or biases. The Output is provided for informational purposes only and should not be considered professional advice. You remain responsible for how you interpret and use the Output.

The BIS makes no warranties regarding the accuracy or completeness of the Output and accepts no liability for any loss or damage resulting from its use.

Do not include or share personal, private, confidential or proprietary information when using the Service.

By using this technology, you agree to the Terms and Conditions.

How the assistant can help you

Understand SDMX standards

Ask and get clear explanations about SDMX standards.

Navigate the website

Find tools and documentation on website quickly.

Explore SDMX tools

Ask about API, software and libraries supporting SDMX.

Access documentation

Locate technical guides, specifications, and FAQs.