LeMyst / WikibaseIntegrator

A Python module to manipulate data on a Wikibase instance (like Wikidata) through the MediaWiki Wikibase API and the Wikibase SPARQL endpoint.
MIT License
68 stars 14 forks source link

Feature request: entityschemas and validation. #470

Open dpriskorn opened 1 year ago

dpriskorn commented 1 year ago

support for entityschemas and validation seems to some degree to be supported in WBI. A user story could be:

LeMyst commented 1 year ago

You want to have your Entity and automatically validate against an entityschema, something like this :

if my_entity.validate_schema('E345'):
  print('entity valid!)
else:
  print('try again 😬')

?

dpriskorn commented 1 year ago

Yes, that was my idea. Maybe given the distributed nature of LOD I want to validate against a schema in another wikibase?

dpriskorn commented 1 year ago

See also https://github.com/SuLab/WikidataIntegrator/issues/200

dpriskorn commented 1 year ago

Here is gpl3 python code validating against an entityschema 😀 https://github.com/Teester/entityshape

dpriskorn commented 1 year ago

I created a alpha library for the entityshape API https://github.com/dpriskorn/PyEntityshape