Skip to main content

Wikidata connector for pyHeimdall

Project description

https://img.shields.io/badge/license-AGPL3.0-informational?logo=gnu&color=success https://www.repostatus.org/badges/latest/inactive.svg PyPI Version https://img.shields.io/badge/documentation-api-green https://gitlab.huma-num.fr/datasphere/heimdall/connectors/wikidata/badges/main/pipeline.svg https://gitlab.huma-num.fr/datasphere/heimdall/connectors/wikidata/badges/main/coverage.svg

What is this?

pyHeimdall is a tool for converting more easily one or more databases from one format to another. It leverages modules called “connectors”, responsible for conversion of data between specific databases schemas and the HERA format.

This repository implements a connector to Wikidata. The implementation was made without any intervention on pyHeimdall proper.

How can I use it?

Setup

This Wikidata pyHeimdall connector is available as a PyPI package named pyheimdall-wikidata. You can install it using the pip package manager:

pip install pyheimdall-wikidata

You can use pip to either upgrade or uninstall this connector, too:

pip install --upgrade pyheimdall-wikidata
pip uninstall pyheimdall-wikidata

Usage

import heimdall

HARRY_POTTER = 'https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q216930&format=json&languages=fr|en'
tree = heimdall.getDatabase(format='api:wikidata', url=HARRY_POTTER)
heimdall.createDatabase(tree, format='hera:xml', url='HARRY_POTTER.xml')

Please note that you don’t need to use pyheimdall-wikidata functions directly. As long as the package is installed on your system, pyHeimdall will automatically discover its features and allow you to use them as long as any other default or external connector.

Is it tested?

Of course! Here’s the coverage report.

How can I contribute?

This project welcomes any feedback or proposal. Details can be accessed here

License

GNU Affero General Public License version 3.0 or later

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyheimdall_wikidata-1.1.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyheimdall_wikidata-1.1.0-py2.py3-none-any.whl (16.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyheimdall_wikidata-1.1.0.tar.gz.

File metadata

  • Download URL: pyheimdall_wikidata-1.1.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for pyheimdall_wikidata-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b0a55a76f7009795f5fa7a14c4a03a72d47cf5ce36469366d57532219e2a4fc6
MD5 823a5b9d476aece59305aed99d5ee89b
BLAKE2b-256 c77913a5d92f07d357fb64a3be43dc1616984925cbcf126bf4963b751d3af1a0

See more details on using hashes here.

File details

Details for the file pyheimdall_wikidata-1.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyheimdall_wikidata-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bbd447b28bfcf815d43dc7391d9a299cdf3b524ae9a24df585c9d0e7662d1774
MD5 28ea12c4778d08599789bd89a42b9bd5
BLAKE2b-256 7583f1a556881be407ca87eeb276f29864113647590de64842fe0dfe9930b88d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page