semvec/pypi-packages huggingface dataset:
maib-ecommerce-sdk 1.1.4
Python SDK for maib ecommerce API
Requires Python: >=3.9
Keywords: maib, moldova, ecommerce, payments, api, sdk, python

# Python SDK for maib ecommerce API
* maib e-commerce API docs: https://docs.maibmerchants.md/e-commerce/
* GitHub project https://github.com/alexminza/maib-ecommerce-sdk-python
* PyPI package https://pypi.org/project/maib-ecommerce-sdk/

## Installation
To easily install or upgrade to the latest release, use `pip`:

```shell
pip install --upgrade maib-ecommerce-sdk
```

## Getting started
Import SDK:

```python
from maib_ecommerce_sdk import MaibAuthRequest, MaibApiRequest
```

Add project configuration:

```python
import os

MAIB_PROJECT_ID = os.getenv('MAIB_PROJECT_ID')
MAIB_PROJECT_SECRET = os.getenv('MAIB_PROJECT_SECRET')
MAIB_SIGNATURE_KEY = os.getenv('MAIB_SIGNATURE_KEY')
```

## SDK usage examples
### Get Access Token with Project ID and Project Secret

```python
maib_auth = MaibAuthRequest.create().generate_token(MAIB_PROJECT_ID, MAIB_PROJECT_SECRET)

maib_token = maib_auth['accessToken']
maib_refresh_token = maib_auth['refreshToken']
```

### Get Access Token with Refresh Token

```python
maib_auth = MaibAuthRequest.create().generate_token(maib_refresh_token)

maib_token = maib_auth['accessToken']
maib_refresh_token = maib_auth['refreshToken']
```

### Direct Payment

```python
# Set up required payment parameters
maib_pay_data = {
    'amount': 10.25,
    'currency': 'EUR',
    'clientIp': '127.0.0.1'
}

# Initiate Direct Payment
maib_pay = MaibApiRequest.create().pay(maib_pay_data, maib_token)

maib_pay_url = maib_pay['payUrl']
maib_pay_id = maib_pay['payId']
```

For more examples see [PHP SDK for maib ecommerce API](https://github.com/maib-ecomm/maib-sdk-php)
trigger-model 0.1.3
Utilities for ML models targeting hardware triggers
Requires Python: >=3.10

# Machine Learning for Hardware Triggers

`trigger_model` provides a set of utilities for Machine Learning models targeting FPGA deployment. 
The `TriggerModel` class consolidates several Machine Learning frontends and compiler backends to construct a "trigger model". MLflow utilities are for logging, versioning, and loading of trigger models.

## Installation

```bash
pip install trigger_model
```

## Usage

```python

from trigger_model.core import TriggerModel 

trigger_model = TriggerModel(name="my-trigger-model", ml_backend="Keras", compiler="hls4ml", model, compiler_config or None)
trigger_model() # call the constructor

# then:
output_software = trigger_model.software_predict(input_data)
output_firmware = trigger_model.firmware_predict(input_data)
output_qonnx = trigger_model.qonnx_predict(input_data)

# save and load trigger models:
trigger_model.save("trigger_model.tar.xz")

# in a separate session:
from trigger_model.core import TriggerModel 
trigger_model = TriggerModel.load("trigger_model.tar.xz")
```

## Logging with MLflow

```python
# logging with MLFlow:
import mlflow
from trigger_model.mlflow_wrapper import log_model

mlflow.set_tracking_uri("https://ngt.cern.ch/models")
experiment_id = mlflow.create_experiment("example-experiment")

with mlflow.start_run(run_name="trial-v1", experiment_id=experiment_id):
    log_model(trigger_model, registered_model_name="TriggerModel")
```

### Note: This package doesn't install dependencies so it won't disrupt specific training environments or custom compilers. For a reference environment, see `environment.yml`.