Skip to main content

Oloren Orchestrator - Python Extension Library

Installation

pip install oloren

A requirement is that you use Python version > 3.7 as the code uses dataclasses which were introduced in that version.

If for some reason you want to use it with Python 3.6 you can install the backport of dataclasses for Python 3.6 with:

pip install dataclasses

Getting Started

Check out this minimal example to get started:

import oloren as olo
import pandas as pd


@olo.register(description="Basic math operations on two numbers.")
def operation(operation=olo.Choice(["Add", "Subtract", "Multiply", "Divide"]), a=olo.Num(), b=olo.Num()):
    if operation == "Add":
        return a + b
    elif operation == "Subtract":
        return a - b
    elif operation == "Multiply":
        return a * b
    elif operation == "Divide":
        return a / b


@olo.register(description="Convert CSV file to JSON")
def dataframe_to_json(csv_file=olo.File()):
    return pd.read_csv(csv_file).to_json()


@olo.register(num_outputs=2)
def twooutputs(s=olo.String(), num=olo.Num()):
    return s, num


if __name__ == "__main__":
    olo.run("starterextension")

The key requirements are that each argument of your function has a default value that is set to one of the special Oloren types. These types subclass their relevant returned data types (e.g. string, int, float) so your autocomplete will work as normal.

Documentation

https://oloren-ai.github.io/python-extension-lib/index.html

Metadata

Release files for oloren 0.0.59

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for oloren 0.0.59
File Interpreter ABI Platform Actions
oloren-0.0.59-py3-none-any.whl Python 3 none any Details for oloren-0.0.59-py3-none-any.whl

Release files / oloren-0.0.59-py3-none-any.whl

Download URL oloren-0.0.59-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c25d09a3ab1126a35d05c8d994a65989afeefdbf25d925f7890748645e977b64
BLAKE2b-256 checksum
How to use checksums
dfc46f16b74ae430bc523e9a52c5e384b667591a20a01757c7d71f3894b8d84f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.12

Security for oloren 0.0.59

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.59 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page