Python toolset for data processing, queries, wikicode generation and page manipulation within OpenSemanticLab.
Work with OpenSemanticLab instances the way you work with Python objects: load pages as typed pydantic entities, query with semantic search, generate models from the schemas stored in the wiki, and write changes back.
Documentation: https://opensemanticlab.github.io/osw-python/
pip install oswOptional extras (osw[wikitext], osw[DB], osw[S3], osw[dataimport],
osw[UI], osw[all]) are described in the
Get Started guide.
from osw.express import OswExpress
osw = OswExpress(domain="wiki-dev.open-semantic-lab.org")
instances = osw.site.semantic_search("[[Category:Item]]")
print(instances)More runnable scripts live in examples/, and the Basics tutorial walks through the OpenSemanticLab data model.
osw reports what it is doing on the osw logger at INFO by default. Levels,
the OSW_LOG_LEVEL environment variable and how to collect the records in your
own logging setup are described in the
Get Started guide.
Contributions are welcome, see CONTRIBUTING.md.
Development setup, checks and tests are one command each: make install,
make check, make test.
General features for object-oriented interaction with knowledge graphs live in the standalone package oold-python.
AGPL-3.0-or-later, see LICENSE.txt.