Socket
Socket
Sign inDemoInstall

python-wikibase

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-wikibase

Wikibase queries and edits made easy


Maintainers
1

python-wikibase

python-wikibase provides an object-oriented abstraction of the Wikibase API.

The library simplifies the authentication process and can be used to query and edit information on Wikidata or any other Wikibase instance.

Example

from python_wikibase import PyWikibase

# Authenticate with Wikibase
py_wb = PyWikibase(config_path="config.json")

# Fetch item and "coordinate location" property
item = py_wb.Item().get(entity_id="item label")
prop = py_wb.Property().get(entity_id="coordinate location")

# Create new GeoLocation value
value = py_wb.GeoLocation().create(1.23, 4.56)

# Create GeoLocation claim
claim = item.claims.add(prop, value)

Installation

pip install python-wikibase

Authentication

The PyWikibase class takes the same authentication and configuration parameters as the WikibaseApi class from the wikibase-api library. See its documentation for a guide on how to authenticate with Wikibase.

Usage

Documentation

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc