> built 2026-10-30 13:04 UTC from 9b89938 (master) · opyratorfront 0.1.2. Details: build_info.json

# index.html.md

<!-- generated by epythet -->

# opyratorfront

Generate opyrator UIs and webservices and docker containers from python functions

To install:	`pip install opyratorfront`

# What it’s about

## opyrator

(From the [readme of opyrator](https://github.com/ml-tooling/opyrator#readme)):

`opyrator` allows us to write code like this:

```python
from pydantic import BaseModel


class Input(BaseModel):
    message: str


class Output(BaseModel):
    message: str


def hello_world(input: Input) -> Output:
    """Returns the `message` of the input data."""
    return Output(message=input.message)
```

Putting this in a file named `my_opyrator.py` and running

```default
opyrator launch-ui my_opyrator:hello_world
```

from the command-line, we can get a web UI that looks like this:

![image](https://raw.githubusercontent.com/ml-tooling/opyrator/main/docs/images/opyrator-hello-world-ui.png)

Not only that, we can also get the underlying webservice, along with
an openAPI specification of the latter, by doing this:

```default
opyrator launch-api my_opyrator:hello_world
```

[And more!](https://github.com/ml-tooling/opyrator#highlights)

## opyratorfront

We have tools (namely
[py2dash](https://github.com/i2mint/py2dash/) and
[streamlitfront](https://github.com/i2mint/streamlitfront/)
) to get from a set of functions to a web UI.

Now `streamlitfront`, like `opyrator`, uses `streamlit` to make a UI from
python, but `streamlit` doesn’t provide a way to remove the UI concern and
only use the underlying web-service independently.
([Though there’s interest in this](https://github.com/streamlit/streamlit/issues/439).)
`opyrator` not only offers that possibility, but also
[many other desirable “dispatches”](https://github.com/ml-tooling/opyrator#highlights).

That said, `opyrator` doesn’t come with all the boilerplate minimized
multi-function get-from-python-functions-to-a-ui-wrapper stuff we’d want.
So we made `opyratorfront` to try to get the best of both worlds.

<p class="epythet-aggregates">This documentation as a single file: <a href="opyratorfront.md">opyratorfront.md</a> (Markdown, for agents).</p>


# _autosummary/opyratorfront.html.md

# opyratorfront

Even quicker way to get webservices, docker containers and GUIs from opyrator

`opyrator` allows us to write code like this:

```pycon
>>> from pydantic import BaseModel
>>>
>>> class Input(BaseModel):
...     message: str
...
>>> class Output(BaseModel):
...     message: str
...
>>> def hello_world(input: Input) -> Output:
...     'Returns the `message` of the input data.'
...     return Output(message=input.message)
```

Putting this in a file named `my_opurator.py` and running

from the command-line, we get a fully functional web GUI for the `hello_world` function.

But to use `opyrator` you need to make those input and output models by hand.
Or do you?…

### Modules

| [`py2pydantic`](_autosummary/opyratorfront.py2pydantic.html.md#module-opyratorfront.py2pydantic)   | Deprecated alias of `front.py2pydantic`.   |
|-------------------------------------------------------------------------------------------------|--------------------------------------------|


# _autosummary/opyratorfront.py2pydantic.html.md

# opyratorfront.py2pydantic

Deprecated alias of `front.py2pydantic`.

The implementation of the “python function -> pydantic model” bridge moved to
`front.py2pydantic`. This module only re-exports it (warning on import) so
that existing `opyratorfront.py2pydantic` imports keep working.

Use `front.py2pydantic` directly in new code – the maintained docstrings,
doctests and API reference all live there.

The re-export contract:

```pycon
>>> from opyratorfront.py2pydantic import (
...     func_to_pyd_func,
...     func_to_pyd_input_model_cls,
...     func_to_pyd_model_specs,
... )
>>> all(map(callable, (
...     func_to_pyd_func, func_to_pyd_input_model_cls, func_to_pyd_model_specs
... )))
True
```


# about-this-build.html.md

<!-- generated by epythet -->

# About this build

This documentation was built on **2026-10-30 13:04 UTC** from commit <a href="https://github.com/i2mint/opyratorfront/commit/9b89938fac25a23066a2deb939aa18157918ea94"><code>9b89938</code></a> on branch <code>master</code>, for **opyratorfront 0.1.2** (from <code>pyproject.toml</code>).

#### WARNING
The documentation and the package may be misaligned:

- The documented version (0.1.2) is behind the latest release on PyPI (0.1.3): `pip install opyratorfront` gives newer code than these docs describe.

## Source

|                     |                                                                                                                                                             |
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Commit              | <a href="https://github.com/i2mint/opyratorfront/commit/9b89938fac25a23066a2deb939aa18157918ea94"><code>9b89938fac25a23066a2deb939aa18157918ea94</code></a> |
| Branch              | <code>master</code>                                                                                                                                         |
| Tags at this commit | none                                                                                                                                                        |
| Working tree        | clean                                                                                                                                                       |
| Remote              | <code>https://github.com/i2mint/opyratorfront</code>                                                                                                        |

## Continuous integration

|              |                                                                                            |
|--------------|--------------------------------------------------------------------------------------------|
| Repository   | <code>i2mint/opyratorfront</code>                                                          |
| Run          | <a href="https://github.com/i2mint/opyratorfront/actions/runs/41060054049">41060054049</a> |
| Ref          | <code>refs/heads/master</code>                                                             |
| Event commit | <code>9b89938fac25a23066a2deb939aa18157918ea94</code> (in the history of the built commit) |

## Tools

|          |         |
|----------|---------|
| epythet  | 0.2.22  |
| Sphinx   | 9.1.1   |
| docutils | 0.22.4  |
| Python   | 3.12.15 |

## Configuration as resolved

|               |                                                                  |
|---------------|------------------------------------------------------------------|
| theme         | <code>auto</code> (Sphinx theme <code>shibuya</code>)            |
| accent        | <code>#006e50</code>                                             |
| api_generator | <code>autosummary</code>                                         |
| ignore        | <code>tests/</code>, <code>scrap/</code>, <code>examples/</code> |
| agent_outputs | <code>true</code>                                                |
| aggregates    | <code>md</code>                                                  |
| ai_artifacts  | <code>true</code>                                                |

## Package on PyPI

Latest release: <a href="https://pypi.org/project/opyratorfront/0.1.3/">0.1.3</a>, newer than the documented version (0.1.2).

## Reproduce

```bash
git clone https://github.com/i2mint/opyratorfront && cd opyratorfront
git checkout 9b89938fac25a23066a2deb939aa18157918ea94
pip install "epythet==0.2.22"
epythet quickstart . --ignore tests/ scrap/ examples/
```

The same data, for machines: <a href="build_info.json"><code>build_info.json</code></a> (schema version 1).


# api.html.md

# API reference

| [`opyratorfront`](_autosummary/opyratorfront.html.md#module-opyratorfront)   | Even quicker way to get webservices, docker containers and GUIs from opyrator   |
|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|


