madata
madata syncs the metadata of datasets between MADATA (Mannheim Data Repository) and Wikidata. It provides access to the MADATA metadata records directly in Python.
Table of contents
Installation
pip install madata
or
git clone https://github.com/UB-Mannheim/madata
cd madata/
pip install .
Initialization
By initialization madata harvests the MADATA OAI-PMH interface, stores the Dublin Core metadata records in records.OAI_DC and queries the Wikidata SPARQL endpoint for the list of metadata records published at MADATA.
Example:
from madata import Metadata
records = Metadata()
print(records)
[('OAI', 'https://madata.bib.uni-mannheim.de/cgi/oai2'),
('MADATA records from OAI-PMH', 163),
('MADATA records at Wikidata', 1),
('In sync?', False)]
Every record rec in the the list records.OAI_DChas the following attributes: rec.metadata (structured metadata record), rec.header (structured header for a metadata record) and rec.raw (raw DC metadata record). The raw header is available via rec.header.raw. Additionally, a pandas-dataframe with metadata records is stored in records.OAI_DC_df.
Syncing
In order to upload the MADATA metadata records to Wikidata, you need an account at Wikidata. If you have an account, use
from madata import Metadata
records = Metadata()
records._sync()
>>> Wikidata username:
>>> Wikidata password:
Type your username and password, then madata starts to sync the metadata records at MADATA and Wikidata.
SPARQL queries
The MADATA-subset at Wikidata: https://w.wiki/6s7R.
Metadata
Release files for madata 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| madata-0.2.0.tar.gz | 5.3 kB | Without provenance | Details for madata-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| madata-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for madata-0.2.0-py3-none-any.whl |
Total release size: 11.1 kB
Release files / madata-0.2.0.tar.gz
| Download URL | madata-0.2.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fcb3a125df905c000400dfb561fab40b3e096f5bbea0d667fad82c76ea6186be
|
|
BLAKE2b-256 checksum How to use checksums |
d842330bf0610ba3c52266d132a9234b627aeea5ce79416876c66a86ed9dfe29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.6
|
Release files / madata-0.2.0-py3-none-any.whl
| Download URL | madata-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f39927d4b75a919aae38e8c7191e961cb00c4181f09afe8ac387a121d3bc0e9c
|
|
BLAKE2b-256 checksum How to use checksums |
e9ff687bf5a45d3c94b716badfefd70c1ddb648d642ef45358eed6a231d9a817
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.6
|
Security for madata 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.