Wrapper library for the Wikibase API
Project description
wikibase-api
wikibase-api
is a Python library for simple access to the Wikibase API.
It simplifies the authentication process and can be used to query and edit information on Wikidata or any other Wikibase instance.
For a simpler, object-oriented abstraction of the Wikibase API, have a look at python-wikibase
.
Installation
pip install wikibase-api
Usage
Simple example for fetching all information about a Wikidata page:
from wikibase_api import Wikibase
wb = Wikibase()
r = wb.entity.get("Q1")
print(r)
Output:
{
"entities": {
"Q1": {
# ...
}
},
"success": 1,
}
See the documentation for descriptions and examples of all commands.
Development
Contributing
Suggestions and contributions are always welcome! Please discuss larger changes via issue before submitting a pull request.
Setup
See this guide on how to set up a development environment for this package.
Related
python-wikibase
– Wikibase queries and edits made easy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wikibase-api-0.1.2.tar.gz
.
File metadata
- Download URL: wikibase-api-0.1.2.tar.gz
- Upload date:
- Size: 27.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.7.6 Darwin/19.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f2c46fda17672944e5deeacd646a986dece6089a26cad89cb7b781d153de648 |
|
MD5 | e0b2c349052a15abe3feb5899d6a685c |
|
BLAKE2b-256 | 7230724f438a5a9403828f43f8b18bdd344a9b39c6a41d8796dd618ce120fdd0 |
File details
Details for the file wikibase_api-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: wikibase_api-0.1.2-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.7.6 Darwin/19.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afc9d8379fa49228d72532d9a4e93f046adb0c0e3287769b2e7917aae83f9ca3 |
|
MD5 | b4125065f563962d4396e90d7d4c647a |
|
BLAKE2b-256 | 787197a4c81093811943ea03a29f55b2fa0c5070dd778444898672dbf5a668ad |