Practical overview
When it fits
Use Opyrator when a Python function with Pydantic-based inputs and outputs needs a generated interface for people or an HTTP endpoint for software.
Who it is for
- Python developers who want to expose a function through an HTTP API.
- Teams that need an interactive web interface for a Python function.
- Machine-learning developers looking to package and share function-based services.
Documented uses
- Wrap a typed Python function in an HTTP API.
- Generate a web UI for entering function inputs and viewing outputs.
- Package a function service as a Docker image or executable file.
Requirements & limits
The project is open source under the MIT license. Its README lists Python 3.6 or newer as a requirement.
- A compatible function requires an input parameter and Pydantic-based input and return values, with model information expressed through type hints.
- The UI and API are separate documented launch modes.
- The project identifies its version as alpha and recommends experimental usage.
- The documented stack includes FastAPI, Streamlit, Pydantic, OpenAPI and JSON Schema.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Launch a local UI or HTTP API for a Python function
Install Opyrator and start either its interactive UI server or HTTP API server for a compatible function.
Before you start
- Python 3.6 or newer.
- A Python function with an input parameter and a return value based on Pydantic models.
- Input and output models specified using Python type hints.
Steps
Install Opyrator with the command below.
pip install opyratorDefine the Pydantic input and output models and a function that accepts the input model and returns the output model.
Save the function in a Python file, such as
my_opyrator.py.Run
opyrator launch-ui my_opyrator:hello_worldfor a UI, oropyrator launch-api my_opyrator:hello_worldfor an HTTP API; substitute the module and function names for your own.
Expected outcome
The command output indicates where the web app or service is being served on the local machine.
Guide limitations
- The project describes its version as alpha and suggests experimental usage.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 October 2026
- Original website title
- ml-tooling/opyrator · Official homepage title · retained in its source language

