Start your own Algo provider from a Python function, interface it DebiAI or something else
Project description
Algo Provider Python module
This Algo-Provider Python module allows you to easily deploy your own algorithm through the Algo Provider API.
What is an Algo Provider?
An Algo Provider is a service that provides algorithms to be used by different applications such as (DebiAI)[https://debiai.irt-systemx.fr/dashboard/algoProviders/] or any other application that uses the Algo Provider API.
Creating an algo-provider requires to create a server, it requires some skills and a lot of time.
The goal of this project is to create a new solution that makes it easier to start an algo-provider, without the need for Docker or advanced developer skills. The targets are Data Scientists that want to use their algorithms with DebiAI.
Getting started
Install the module with pip:
pip install easy-algo-provider
Then, create a Python file with the following content:
# First define your algorithm following a strict docstring format
def my_algo1(input1: int, input2: int) -> int:
"""
This is a simple algorithm that adds two numbers together.
Parameters:
input1 (int): The first number to add.
input2 (int): The second number to add.
Returns:
int: The sum of the two numbers.
"""
return input1 + input2
# Then create an AlgoProvider object and add your algorithm to it
from easy_algo_provider import AlgoProvider
provider = AlgoProvider()
provider.add_algo(my_algo1)
# Finally, start the server
provider.start_server()
Run the Python file and your algorithm is now available through the Algo Provider API!
The content of the docstring will be used to generate Algo descriptions in the DebiAI interface, and the function will be called with the parameters provided by the user. The return value will be sent back to the user and displayed in the DebiAI interface.
Parameters
You can specify the following parameters when adding an algorithm:
provider.add_algo(
my_algo_3,
author="DebiAI",
version="1.0.0",
creation_date="2024-01-01",
update_date="2024-01-01",
tags=["Math", "Addition"],
)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file algo-provider-1.0.0.tar.gz.
File metadata
- Download URL: algo-provider-1.0.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96a8f8e785f2217b32c4e99a1c83352e19078af3ca22a1dcb9bd5dd63f607073
|
|
| MD5 |
7895378bbde1872c605fb7c0ff7f6fa1
|
|
| BLAKE2b-256 |
a4dfb16de2d8c4dca7f00d3ab1d9ddf3768b22a5b391083afafa9ece4ff42d42
|
File details
Details for the file algo_provider-1.0.0-py3-none-any.whl.
File metadata
- Download URL: algo_provider-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80256c4d59b24969d6cf9e91de8a1763c2f010b0164a2556b7c985968b92fad3
|
|
| MD5 |
24325333cea2081de06ededb5fc45742
|
|
| BLAKE2b-256 |
c00f05622a1b024a9ce59a0bc2c04755225e05e7c9428000b396d600ff198604
|