Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Latest commit

 

History

History
67 lines (42 loc) · 992 Bytes

File metadata and controls

67 lines (42 loc) · 992 Bytes

Items and Properties

Item

Creating an item

Creating an item with label "test item"

item = py_wb.Item().create("test item")

Getting an item

Fetching all information about the item with the ID "Q1":

item = py_wb.Item().get(entity_id="Q1")

Updating the information about a previously fetched item:

item.get()

Deleting an item

Deleting a previously fetched item:

item.delete()

Property

Creating a property

Creating a property with label "location" and data type "GeoLocation"

prop = py_wb.Property().create("location", data_type="GeoLocation")

The default data_type is "StringValue"

Getting a property

Fetching all information about the property with the ID "P1":

prop = py_wb.Property().get(entity_id="P1")

Updating the information about a previously fetched property:

prop.get()

Deleting a property

Deleting a previously fetched property:

prop.delete()