Page MenuHomePhabricator

get datatype of a Wikibase property via API
Closed, ResolvedPublic

Description

Originally from: http://sourceforge.net/p/pywikipediabot/patches/618/
Reported by: beta16
Created on: 2013-06-07 10:04:39
Subject: WikiData: property datatype
Assigned to: amird
Original description:
in file attached there's a simple function for determine datatype of a wikidata property via API, instead use of "isinstance".
Useful in DataPage.editclaim\(\)


Version: compat-(1.0)
Severity: enhancement
See Also:
https://sourceforge.net/p/pywikipediabot/patches/618

Details

Reference
bz54543

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:10 AM
bzimport set Reference to bz54543.
  • assigned_to: nobody --> amird

Looks good, I will commit and make related changes

I want to add a comment but the new system don't let me
"It's seems a bad idea because getting datatype each time we want to make a edit put lots of pressure on server I think using a cache for properties would be better (like featured.py)"

Now I can post a new comment, so I'll respond here too.

Your idea is really interesting, would be a good thing the use of the cache, either for speed and for the bandwidth.

Change 92074 had a related patch set uploaded by Gerrit Patch Uploader:
Add function to determine datatype of a wikidata property via API instead of via "isinstance"

https://gerrit.wikimedia.org/r/92074

Change 92074 merged by jenkins-bot:
Add function to determine datatype of a wikidata property via API instead of via "isinstance"

https://gerrit.wikimedia.org/r/92074