Skip to main content

Python SDK for interacting with Okareo Cloud APIs

Project description

Okareo Python SDK

PyPI PyPI - Python Version PyPI - License


PyPI: https://pypi.org/project/okareo/


Python library for interacting with Okareo Cloud APIs

Documentation

Getting Started, Guides, and API docs

Installation

  1. Install the package

    pip install okareo
    
  2. Get your API token from https://app.okareo.com/ (Note: You will need to register first.)

  3. Go directly to the "2. Create your API Token" on the landing page in above app.

  4. Set the environment variable OKAREO_API_KEY to your generated API token.

Get Started Example Notebooks

Please see and run this notebook:
https://github.com/okareo-ai/okareo-python-sdk/blob/main/examples/classification_eval.ipynb

See additional examples under:
https://github.com/okareo-ai/okareo-python-sdk/tree/main/examples

Using Okareo LangChain Callbacks Handler

We provide a LangChain callback handler that lets you easily integrate your current workflows with the Okareo platform.

If don't have LangChain dependencies installed in your environment, you can install the base ones (that will help you run the examples) with:

pip install okareo[langchain]

Integrating callbacks into your chain is as easy as importing the SDK in your module add adding the following

from okareo.callbacks import CallbackHandler
...
handler = CallbackHandler(mut_name="my-model", context_token="context-token")
llm = OpenAI(temperature=0.3, callbacks=[handler])

During the LangChain LLM runs we will collect input and output information so you can analyze it further with the Okareo toolkit.

You can also see an usage example in ./examples/langchain_callback_example.py

Rendering Docs via pydoc-markdown

To render the Python SDK documentation, you can use source/build_docs.sh in this repository. This will do the following:

  1. Install the SDK poetry environment
  2. Run pydoc-markdown as configured in pyproject.toml
  3. Perform postprocessing to re-order the generated sidebar file and change heading levels.

The generated docs will be found in the docs/python-sdk and can be rendered with docusaurus.


All rights reserved for Okareo Inc

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

okareo-0.0.120.tar.gz (185.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

okareo-0.0.120-py3-none-any.whl (403.7 kB view details)

Uploaded Python 3

File details

Details for the file okareo-0.0.120.tar.gz.

File metadata

  • Download URL: okareo-0.0.120.tar.gz
  • Upload date:
  • Size: 185.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.10.19 Linux/6.14.0-1017-azure

File hashes

Hashes for okareo-0.0.120.tar.gz
Algorithm Hash digest
SHA256 71fe42e17f1c658363c75bc925ce9b792fcfc118c067574cccf1c15144772646
MD5 f43f1af931f3e4c9a902b09f76f79485
BLAKE2b-256 1af2d43f590b271bede68e7f55664edd96eed5e3a05cfcbc7c2693adbeecd3e1

See more details on using hashes here.

File details

Details for the file okareo-0.0.120-py3-none-any.whl.

File metadata

  • Download URL: okareo-0.0.120-py3-none-any.whl
  • Upload date:
  • Size: 403.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.10.19 Linux/6.14.0-1017-azure

File hashes

Hashes for okareo-0.0.120-py3-none-any.whl
Algorithm Hash digest
SHA256 6e8750e36b8cdcd2dc14cc1eec193dc3a9a2d2b85b0d4bf5e319058c0736f51a
MD5 5c88e3ab06dfed50dfc3d2e40678c41d
BLAKE2b-256 9d6347973c30cc6b00819b8d25df2c76f3dce7a7086b34df2a06cab46808b003

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page