Skip to content

Repository files navigation

PyPI-Server DOI Codecov docs license

osw

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/

Installation

pip install osw

Optional extras (osw[wikitext], osw[DB], osw[S3], osw[dataimport], osw[UI], osw[all]) are described in the Get Started guide.

Quickstart

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.

Logging

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.

Contributing

Contributions are welcome, see CONTRIBUTING.md. Development setup, checks and tests are one command each: make install, make check, make test.

Related projects

General features for object-oriented interaction with knowledge graphs live in the standalone package oold-python.

License

AGPL-3.0-or-later, see LICENSE.txt.

About

No description, website, or topics provided.

Resources

Contributing

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages