Metadata-Version: 2.4
Name: osw
Version: 1.1.0
Summary: Python toolset for data processing, queries, wikicode generation and page manipulation
Home-page: https://github.com/OpenSemanticLab/osw-python
Author: OpenSemanticWorld
Author-email: team@opensemantic.world
License: AGPL-3.0-or-later
Project-URL: Documentation, https://opensemanticlab.github.io/osw-python/
Project-URL: Source, https://github.com/OpenSemanticLab/osw-python
Project-URL: Changelog, https://github.com/OpenSemanticLab/osw-python/blob/main/CHANGELOG.md
Project-URL: Download, https://pypi.org/project/osw/#files
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
License-File: LICENSE.txt
Requires-Dist: oold>=0.15.0
Requires-Dist: opensemantic
Requires-Dist: opensemantic.core>=0.57.4
Requires-Dist: opensemantic.base>=0.42.7
Requires-Dist: pydantic[email]>=1.10.17
Requires-Dist: datamodel-code-generator==0.51.0
Requires-Dist: black
Requires-Dist: isort
Requires-Dist: ruamel.yaml<0.19.0
Requires-Dist: mwclient>=0.11.0
Requires-Dist: rdflib
Requires-Dist: PyLD
Requires-Dist: SPARQLWrapper
Requires-Dist: jsonpath-ng
Requires-Dist: numpy
Requires-Dist: pyyaml
Requires-Dist: pandas
Requires-Dist: typing_extensions
Requires-Dist: pathlib
Requires-Dist: sphinx
Requires-Dist: chardet
Requires-Dist: matplotlib
Requires-Dist: scipy
Requires-Dist: dask
Requires-Dist: asyncio
Requires-Dist: tqdm
Requires-Dist: pybars3-wheel
Provides-Extra: wikitext
Requires-Dist: mwparserfromhell; extra == "wikitext"
Provides-Extra: db
Requires-Dist: psycopg2; extra == "db"
Requires-Dist: sqlalchemy; extra == "db"
Provides-Extra: s3
Requires-Dist: boto3; extra == "s3"
Provides-Extra: dataimport
Requires-Dist: geopy; extra == "dataimport"
Requires-Dist: deepl; extra == "dataimport"
Requires-Dist: openpyxl; extra == "dataimport"
Provides-Extra: ui
Requires-Dist: pysimplegui; extra == "ui"
Provides-Extra: workflow
Requires-Dist: prefect<3.0,>=2.20.25; extra == "workflow"
Provides-Extra: tutorial
Requires-Dist: geopy; extra == "tutorial"
Requires-Dist: deepl; extra == "tutorial"
Requires-Dist: openpyxl; extra == "tutorial"
Provides-Extra: all
Requires-Dist: geopy; extra == "all"
Requires-Dist: deepl; extra == "all"
Requires-Dist: openpyxl; extra == "all"
Requires-Dist: psycopg2; extra == "all"
Requires-Dist: sqlalchemy; extra == "all"
Requires-Dist: pysimplegui; extra == "all"
Requires-Dist: boto3; extra == "all"
Requires-Dist: mwparserfromhell; extra == "all"
Provides-Extra: dev
Requires-Dist: pre-commit>=3.2.0; extra == "dev"
Requires-Dist: tox; extra == "dev"
Provides-Extra: testing
Requires-Dist: pytest-asyncio; extra == "testing"
Requires-Dist: prefect; extra == "testing"
Requires-Dist: setuptools; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Requires-Dist: pytest-mock; extra == "testing"
Requires-Dist: geopy; extra == "testing"
Requires-Dist: deepl; extra == "testing"
Requires-Dist: sqlalchemy; extra == "testing"
Requires-Dist: psycopg2-binary; extra == "testing"
Requires-Dist: mwparserfromhell; extra == "testing"
Requires-Dist: jsondiff; extra == "testing"
Dynamic: license-file

[![PyPI-Server](https://img.shields.io/pypi/v/osw.svg)](https://pypi.org/project/osw/)
[![DOI](https://zenodo.org/badge/458130867.svg)](https://zenodo.org/badge/latestdoi/458130867)
[![Coveralls](https://img.shields.io/coveralls/github/OpenSemanticLab/osw-python/main.svg)](https://coveralls.io/r/OpenSemanticLab/osw)
[![docs](xx.xx)](https://opensemanticlab.github.io/osw-python/)
![license](https://img.shields.io/github/license/OpenSemanticLab/osw-python.svg)
<!-- [![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.
com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev) -->
[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)

# osw

Python toolset for data processing, queries, wikicode generation and page manipulation within OpenSemanticLab.

General features for object-oriented interaction with knowledge graphs are planned to be moved to a standalone package:
[oold-python](https://github.com/OpenSemanticWorld/oold-python)

## Installation
```
pip install osw
```

### Variants
| Variant | Description |
| -- | -- |
`osw[wikitext]` | Additional functions in `wiki_tools` to transform mediawiki markup / templates
`osw[DB]` | interact with SQL databases per DatabaseController
`osw[S3]` | Interact with S3 Stores per S3FileController
`osw[dataimport]` | Additional tools to import data
`osw[UI]` | To use a helper UI to work with entity slots

To install multiple optional/extra dependencies run
```
pip install osw[opt1, opt2, ...]
```

To install all optional/extra dependencies run
```
pip install osw[all]
```

## Getting started
You can find examples in the tutorial folder, e.g. [entity creation](https://github.com/OpenSemanticLab/osw-python/blob/main/examples/create_entity.py), [entity manipulaton](https://github.com/OpenSemanticLab/osw-python/blob/main/examples/store_entity.py), [querying](https://github.com/OpenSemanticLab/osw-python/blob/main/examples/query_minimal.py), and [file downloads](https://github.com/OpenSemanticLab/osw-python/blob/main/examples/file_download_minimal.py)

## Troubleshooting

### `Error: datamodel-codegen not found`
make sure datamodel-codegen is installed and included in PATH, e. g. on jupyterlab:
```
os.environ["PATH"] += os.pathsep + "/home/jovyan/.local/bin"
```

## Documentation

https://opensemanticlab.github.io/osw-python/

### Tutorials

Tutorials can be found at [tutorials](docs/tutorials/)
- [Basics](docs/tutorials/basics.md) - a description of the data model of OpenSemanticLab and how to interact with it

## Development

Dev install
```bash
pip install -e . [dev,testing]
```

Activate pre-commit hooks (in git console)
```
pre-commit install
```

Run tests
```bash
tox -e test
```

Run integration tests (tests are skipped if login params are not provided)
```bash
tox -e test -- --wiki_domain "<osl-domain>" --wiki_username "<(bot)login>" --wiki_password "<password>" --db_username "<username>" --db_password "<password>"
```

<!-- pyscaffold-notes -->

## Note

This project has been set up using PyScaffold 4.3.1. For details and usage
information on PyScaffold see https://pyscaffold.org/.
