semvec/pypi-packages huggingface dataset:
pycider 3.0.1
Aggregates composition for domain driven design in Python
Requires Python: <4.0,>=3.12
Keywords: ddd, domain, design, decider, deciders, aggregates, aggregate, composition

# Pycider

[![Documentation Status](https://readthedocs.org/projects/pycider/badge/?version=latest)](https://pycider.readthedocs.io/en/latest/?badge=latest)![Test Status](https://github.com/melodyasper/pycider/actions/workflows/ci.yml/badge.svg)


[Documentation is here](http://pycider.readthedocs.io/). This code is a Python implementation of deciders based on the F# code from [Jérémie Chassaing](https://github.com/thinkbeforecoding/) located here [dddeu-2023-deciders](https://github.com/thinkbeforecoding/dddeu-2023-deciders). There was additionally a talk on this, to be found [here](https://www.youtube.com/watch?v=72TOhMpEVlA).

## Installation

You can use `pip install pycider` or `poetry add pycider` to install this project from [PyPI](https://pypi.org/project/pycider/).

## Usage

You can create `Process` or a `Decider`. A simple example of this can be found under the [test composition page](./tests/test_compositions.py). 

## Decider 

`Decider` is a simple state machine that seperates state changes and actions. `Command`s are actions which when executed return `Event`s representing the results from the actions. You can use `Event`'s to deterministically update the `State` allowing replayability and easy serialization by only saving `Event`'s. 

* `Command`s are turned into `Event`'s through `decide()` calls.
* `Event`'s deterministically update the `State` through `evolve()` calls.

## Process

`Process` is a simple state machine for managing a system. A system has several needs. The system given a `State` should be able to resume to the next `Command`, The system should be able to react to `Event` changes and return `Command`'s for dealing with those changes. Finally the system should be able to update the `State` deterministically given a `Event`. 

* `Event`'s are turned into `Command`s thrugh `react()` calls.
* Given a `State`, the system should be able to `resume()` to the appropriate `Command`.
* `Event`'s deterministically update the `State` through `evolve()` calls.
algo-provider 1.0.2
Start your own Algo provider from a Python function, interface it DebiAI or something else
Requires Python: >=3.7

# Algo Provider Python module

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

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:

```bash
pip install algo-provider
```

Then, create a Python file with the following content:

```python
# 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](./result.png)

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:

```python
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"],
)
```