Name | acdh-wikidata-pyutils JSON |
Version |
3.0
JSON |
| download |
home_page | None |
Summary | Python package to fetch data from Wikidata |
upload_time | 2025-09-03 07:49:31 |
maintainer | None |
docs_url | None |
author | Peter Andorfer |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2023 Austrian Centre for Digital Humanities & Cultural Heritage Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
wikidata
api client
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[](https://github.com/acdh-oeaw/acdh-wikidata-pyutils/actions/workflows/lint.yml)
[](https://github.com/acdh-oeaw/acdh-wikidata-pyutils/actions/workflows/test.yml)
[](https://codecov.io/gh/acdh-oeaw/acdh-wikidata-pyutils)
[](https://badge.fury.io/py/acdh-wikidata-pyutils)
[](https://acdh-oeaw.github.io/acdh-wikidata-pyutils/)
# acdh-wikidata-pyutils
Utility package to fetch data from Wikidata
## install
```shell
pip install acdh-wikidata-pyutils
```
## usage
```python
from acdh_wikidata_pyutils import WikiDataPerson
item = WikiDataPerson("https://www.wikidata.org/wiki/Q44331")
person = item.get_apis_entity()
print(person)
>>> {'name': 'Schnitzler', 'first_name': 'Arthur', 'start_date_written': '1862-05-15', 'end_date_written': '1931-10-21', 'gender': 'male'}
```
```python
from acdh_wikidata_pyutils import WikiDataPlace
item = WikiDataPlace("https://www.wikidata.org/wiki/Q41329")
place = item.get_apis_entity()
print(place)
>>> {'name': 'Linz', 'lat': 48.30583333333333, 'long': 14.286388888888888}
```
```python
from acdh_wikidata_pyutils import fetch_image
wiki_id = "Q2390830"
item = fetch_image(wiki_id)
print(item)
>>> "https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Theo._Komisarjevsky_LCCN2014715267.jpg/250px-Theo._Komisarjevsky_LCCN2014715267.jpg"
```
Raw data
{
"_id": null,
"home_page": null,
"name": "acdh-wikidata-pyutils",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "Wikidata, api client",
"author": "Peter Andorfer",
"author_email": "Peter Andorfer <peter.andorfer@oeaw.ac.at>",
"download_url": "https://files.pythonhosted.org/packages/3e/ae/51a3a8a480a867abea21357e126cd9ab165a946ddbfaaaa27261607e32ca/acdh_wikidata_pyutils-3.0.tar.gz",
"platform": null,
"description": "[](https://github.com/acdh-oeaw/acdh-wikidata-pyutils/actions/workflows/lint.yml)\n[](https://github.com/acdh-oeaw/acdh-wikidata-pyutils/actions/workflows/test.yml)\n[](https://codecov.io/gh/acdh-oeaw/acdh-wikidata-pyutils)\n[](https://badge.fury.io/py/acdh-wikidata-pyutils)\n[](https://acdh-oeaw.github.io/acdh-wikidata-pyutils/)\n\n# acdh-wikidata-pyutils\nUtility package to fetch data from Wikidata\n\n## install\n\n```shell\npip install acdh-wikidata-pyutils\n```\n\n## usage\n\n```python\nfrom acdh_wikidata_pyutils import WikiDataPerson\n\nitem = WikiDataPerson(\"https://www.wikidata.org/wiki/Q44331\")\nperson = item.get_apis_entity()\nprint(person)\n>>> {'name': 'Schnitzler', 'first_name': 'Arthur', 'start_date_written': '1862-05-15', 'end_date_written': '1931-10-21', 'gender': 'male'}\n```\n\n```python\nfrom acdh_wikidata_pyutils import WikiDataPlace\n\nitem = WikiDataPlace(\"https://www.wikidata.org/wiki/Q41329\")\nplace = item.get_apis_entity()\nprint(place)\n>>> {'name': 'Linz', 'lat': 48.30583333333333, 'long': 14.286388888888888}\n```\n\n\n```python\nfrom acdh_wikidata_pyutils import fetch_image \nwiki_id = \"Q2390830\"\nitem = fetch_image(wiki_id)\nprint(item)\n>>> \"https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Theo._Komisarjevsky_LCCN2014715267.jpg/250px-Theo._Komisarjevsky_LCCN2014715267.jpg\"\n```",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Austrian Centre for Digital Humanities & Cultural Heritage Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Python package to fetch data from Wikidata",
"version": "3.0",
"project_urls": {
"Repository": "https://github.com/acdh-oeaw/acdh-wikidata-pyutils"
},
"split_keywords": [
"wikidata",
" api client"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "641e5da60971441e4205ef791a3d825a7bfd9f2465a8a298ad721daa9b84cf03",
"md5": "5e5d6440fc152bd2ff91b4fd5f5da4c7",
"sha256": "43e6da6015e7b6efeb6f0f1a5a0fe0a3baa2f4e3fd642a9452c71c7219ac883d"
},
"downloads": -1,
"filename": "acdh_wikidata_pyutils-3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5e5d6440fc152bd2ff91b4fd5f5da4c7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 4846,
"upload_time": "2025-09-03T07:49:30",
"upload_time_iso_8601": "2025-09-03T07:49:30.664317Z",
"url": "https://files.pythonhosted.org/packages/64/1e/5da60971441e4205ef791a3d825a7bfd9f2465a8a298ad721daa9b84cf03/acdh_wikidata_pyutils-3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3eae51a3a8a480a867abea21357e126cd9ab165a946ddbfaaaa27261607e32ca",
"md5": "c2fc08c5347562e9bf3a6ec6b1505442",
"sha256": "cb9f0e21cd7bfbc58f511e7eec39f9ed1d33d7193731dc4746ac7b359eef3432"
},
"downloads": -1,
"filename": "acdh_wikidata_pyutils-3.0.tar.gz",
"has_sig": false,
"md5_digest": "c2fc08c5347562e9bf3a6ec6b1505442",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 4140,
"upload_time": "2025-09-03T07:49:31",
"upload_time_iso_8601": "2025-09-03T07:49:31.491013Z",
"url": "https://files.pythonhosted.org/packages/3e/ae/51a3a8a480a867abea21357e126cd9ab165a946ddbfaaaa27261607e32ca/acdh_wikidata_pyutils-3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-03 07:49:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "acdh-oeaw",
"github_project": "acdh-wikidata-pyutils",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "acdh-wikidata-pyutils"
}