Metadata-Version: 2.5
Name: ohi-sdk
Version: 0.18.5
Summary: Search ontologies on ohi.dev, inspect their metadata and download their files.
Project-URL: Homepage, https://ohi.dev
Project-URL: Documentation, https://ohi.dev/docs/reference/sdks/
Project-URL: Source, https://github.com/NeverBlink-OSS/ohi
Project-URL: Issues, https://github.com/NeverBlink-OSS/ohi/issues
Project-URL: Changelog, https://github.com/NeverBlink-OSS/ohi/releases
Author: NeverBlink
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: catalog,linkml,ohi,ontology,owl,rdf
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: pydantic<3,>=2.12
Description-Content-Type: text/markdown

# ohi SDK for Python

Search ontologies on [ohi.dev](https://ohi.dev), inspect their metadata, download selected files and save file selections.

Install on Python 3.10 or later:

```sh
python -m pip install ohi-sdk
```

Search, inspect the first hit and download its first file:

```python
from ohi import CatalogClient, SearchRequest

client = CatalogClient()
page = client.search(SearchRequest(q="sensors", page=1, per_page=10))
if page.hits:
    publication = client.inspect(page.hits[0].base_url)
    artifact = publication.artifacts[0]
    content = client.get(artifact.url)
```

`get` returns the file's bytes.

**See the [SDK documentation](https://ohi.dev/docs/reference/sdks/)** for configuration, file selections, metadata and errors.
