- Notifications
You must be signed in to change notification settings - Fork5
🤖 Wikibase queries and edits made easy
License
Unknown and 2 other licenses found
Licenses found
samuelmeuli/python-wikibase
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
python-wikibase provides an object-oriented abstraction of theWikibase API.
The library simplifies the authentication process and can be used to query and edit information on Wikidata or any other Wikibase instance.
pip install python-wikibase
Simple example for adding a coordinate location claim to an existing Wikibase item:
frompython_wikibaseimportPyWikibase# Authenticate with Wikibasepy_wb=PyWikibase(config_path="config.json")# Fetch item and "coordinate location" propertyitem=py_wb.Item().get(entity_id="item label")prop=py_wb.Property().get(entity_id="coordinate location")# Create new GeoLocation valuevalue=py_wb.GeoLocation().create(1.23,4.56)# Create GeoLocation claimclaim=item.claims.add(prop,value)
See thedocumentation for descriptions and examples of all commands.
ThePyWikibase class takes the same authentication and configuration parameters as theWikibaseApi class from thewikibase-api library (which is used internally). Seeits documentation for a guide on how to authenticate with Wikibase.
Suggestions and contributions are always welcome! Please discuss larger changes via issue before submitting a pull request.
Seethis guide on how to set up a development environment for this package.
wikibase-api– Wrapper library for the Wikibase API
About
🤖 Wikibase queries and edits made easy
Topics
Resources
License
Unknown and 2 other licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.