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 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 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!

Expected output

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.2.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.2-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file algo-provider-1.0.2.tar.gz.

File metadata

  • Download URL: algo-provider-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b8bfbbb1eab26574034bd0e3ba15cd560efba1a2c2b52ec48f704f9e096c391c
MD5 e2c616f37a423573b6aec7d68ab6837f
BLAKE2b-256 4cf0510a937f91000c1bb70db0f14514bb5d1547d794dedf9a47d1e7009802eb

See more details on using hashes here.

File details

Details for the file algo_provider-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: algo_provider-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 417015e2992b2eec4d123d5a348550de321d7ae45a3f20c2743e7e69a7f5ff4f
MD5 dbbb465c24df86c9caa6218f51c9321e
BLAKE2b-256 7e38e002415e025ea04fa3a4d17c71568b314d1df0f3fe0b7acef5e62d29675d

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