This project contains a REST API client for MDM (Metadatamanagement System) of the Research Data Center of the DZHW.
The client can be used to retrieve metadata from the public REST API of the MDM. Currently it uses a cache which gets stale after 24 hours.
You can install the latest version of this client with
pip install git+https://github.com/dzhw/mdm-python-client.git#v1.0.106
The previous last version which supports Python 2.7 can be installed with
pip install git+https://github.com/dzhw/mdm-python-client.git#v1.0.104
The installation will also install a command line version which you can run with
mdm --help
The following snippet demonstrates how to use the client programmatically:
from mdm_python_client.mdm_client import get_datapackage
def test_get_datapackage():
datapackage = get_datapackage("stu-gra2005$")
if datapackage is not None:
print("Pakettitel:", datapackage.title.de)
print("DOI:", datapackage.doi)
print("Veröffentlichungsjahr:", datetime.datetime.strptime(datapackage.release.firstDate,
'%Y-%m-%dT%H:%M:%S.%f').strftime("%Y"))
else:
print("Datenpaket mit id", args.datapackageId, "nicht gefunden!")
Please file an issue in the issue tracker of the MDM.