Skip to main content

Start your own Algo provider from a Python function, interface it DebiAI or something else

Project description

Algo Provider Python module

License

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


Download files

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

Source Distribution

algo-provider-1.0.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

algo_provider-1.0.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

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

Hashes for algo-provider-1.0.0.tar.gz
Algorithm Hash digest
SHA256 96a8f8e785f2217b32c4e99a1c83352e19078af3ca22a1dcb9bd5dd63f607073
MD5 7895378bbde1872c605fb7c0ff7f6fa1
BLAKE2b-256 a4dfb16de2d8c4dca7f00d3ab1d9ddf3768b22a5b391083afafa9ece4ff42d42

See more details on using hashes here.

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

Hashes for algo_provider-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80256c4d59b24969d6cf9e91de8a1763c2f010b0164a2556b7c985968b92fad3
MD5 24325333cea2081de06ededb5fc45742
BLAKE2b-256 c00f05622a1b024a9ce59a0bc2c04755225e05e7c9428000b396d600ff198604

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