/
2.b Example python code to upload metadata to FDP

2.b Example python code to upload metadata to FDP

Introduction

If you want to set up an automatic tool to export metadata to a FAIR data point but do not know where to start you may consider using SeMPyRO package to prepare data.

SeMPyRO is a pydantic-based Python package aiming to make working with ontologies easier by implementing main DCAT instances as pydantic classes and providing logic to convert instances of those classes to an RDF graph.

Explanation / Approach

More details on the SeMPyRO package itself can be found in the repository: GitHub - Health-RI/SeMPyRO: pydantic data models for DCAT-AP v3

Among other documentation we provide a Jupyter notebook with example code: SeMPyRO/docs/Usage_example_FDP.ipynb at main Β· Health-RI/SeMPyRO

You can execute this notebook with your FAIR Data Point instance to get a grasp what metadata preparation and uploading to an FDP may look like and create scripts of your own. Here is a tutorial describing using SeMPyRO for publishing metadata in an FDP Publishing metadata in FDP using SeMPyRO

Prerequirements

  • A running FDP instance

How to run the notebook

  • Clone SeMPyRO repository

  • Install Jupyter notebook (An official installation guide: Project Jupyter )

  • Install SeMPyRO package ( pip install sempyro ) and dependecies

  • Install additional dependencies for the particular notebook: tabulate and pandas

  • Run Jupyter notebook, the repository with a running kernel will be opened in your browser.

  • Navigate to ./docs/Usage_example_FDP.ipynb, you can execute statements there one by one

Related content

1.a Expose your local system
1.a Expose your local system
More like this
2.a Automate export from your local system
2.a Automate export from your local system
More like this
1.b FDP reference implementation
1.b FDP reference implementation
Read with this
1.c Central FDP
1.c Central FDP
More like this
4A Metadata mapping
4A Metadata mapping
Read with this
4B Exposing metadata
4B Exposing metadata
More like this