semvec/pypi-packages huggingface dataset:
dsr-model-sdk 0.0.15
A agent helper support send data out the service
Requires Python: >=3.10

# DataSpire Model SDK

Support AI Engineer an easy way to send the event of AI Model to Kafka topic

## Quick Starts

<div class="termy">

```console
$ pip install dsr-model-sdk

---> 100%
```

</div>

## Example

* Create a file `main.py` with:

```Python
dsr_sdk = DataSpireSDK(id= 'model-id-1',name='model-name-1', health_worker=True, target="kafka-bridge.local")

@app.post("/predict")
def processing(request: Request):
    # Start request 
    sess = dsr_sdk.newSession()
    sess.start(req: request)

    result = {"Result": "result"}
    
    # End request 
    sess.completed(req: request, data=result)
    sess.close()

    return result
```

* Can also send error and processing:

```Python
# Just created one time
dsr_sdk = DataSpireSDK(id= 'model-id-1',name='model-name-1', health_worker=True, target="kafka-bride.local")

@app.post("/predict")
def processing(request: Request):
    # Start request 
    sess = dsr_sdk.newSession()
    sess.start(request)

    result = None

    try:
        sess.processing(req: request, data={"current": 1, "total": 10000})
        sess.processing(req: request, data={"current": 100, "total": 10000})
        sess.processing(req: request, data={"current": 1000, "total": 10000})
        sess.processing(req: request, data={"current": 9999, "total": 10000})

        result = {"Result": "result"}
        # End request 
    except Exception:
        sess.failed(req: request, error={"Exception Error": "Data input format validated failed..."})
    finally:
        sess.close()
    
    return result
```
dll-finder 1.0
dll_finder
Requires Python: >=3.11

# dll_finder - Given one or more Windows executables, get paths of necessary DLLs

Copyright 2023 Eric Smith

dll_finder development is hosted at the
[dll_finder Github repository](https://github.com/brouhaha/dll_finder/).

## Introduction

dll_finder is used when cross-compiling Windows executables on Linux using
the MinGW suite. When packaging such executables, it is necessary to include
some DLLs provided by MinGW packages. dll_finder is used to obtain a list
of the necessary DLL paths.
aitestgen 0.0.2
Tool to generate simple unit test using openai api
Requires Python: >=3.11,<4.0

# AITestGen
Python Library to generate unit tests using OpenAI API

## Installation
### Create a virtual enviroment (Optional)
```bash
python -m venv venv
source venv/bin/activate # venv/Scripts/activate on Windows
```
### Install package (require python ^3.11 version)
```bash
pip install aitestgen
```

### Add OpenAI API Key (Required)
```bash
export OPENAI_API_KEY=<my_api_key>  # or add variable in your .env file
```

## Example
Create a python file and add the following code:
```python
from aitestgen.autotest import autotest

@autotest()
def sum(num1: float, num2: float) -> float:
    """This function is responsible for calculating the sum of two numbers"""
    return num1 + num2

@autotest()
def mul(num1: float, num2: float) -> float:
    """This function is responsible for calculating the multiplication of two numbers"""
    return num1 * num2
```

### Important:
To improve results, add type annotations and documentation to the function.

## Generate tests:

Run the following command (change the filename)
```bash
aitestgen generate --inputfile src/operations.py
```

And then you will get the following result in a .py file created in a tests folder:

## Result
```python

# Function: mul - test1:
def test_mul_positive_numbers():
    assert mul(5.5, 2) == 11.0

# Function: mul - test2:
def test_mul_negative_numbers():
    assert mul(-3, 4) == -12.0

# Function: mul - test3:
def test_mul_zero():
    assert mul(0, 10) == 0.0

# Function: sum - test1:
def test_sum_positive_numbers():
    assert sum(3.5, 2.5) == 6.0

# Function: sum - test2:
def test_sum_negative_numbers():
    assert sum(-3.5, -2.5) == -6.0

# Function: sum - test3:
def test_sum_mixed_numbers():
    assert sum(3.5, -2.5) == 1.0

```