Metadata-Version: 2.1
Name: inferio-x
Version: 0.1.0
Summary: 
Home-page: https://github.com/portmind/inferio
Author: Portmind's ML Engineering Team
Maintainer: Sevak Harutyunyan
Maintainer-email: sevak.harutyunyan@portmind.com
Requires-Python: >=3.8,<4.0
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: fileupload
Requires-Dist: httptools (>=0.6.1,<0.7.0)
Requires-Dist: httpx (>=0.25.2,<0.26.0)
Requires-Dist: orjson (>=3.9.10,<4.0.0)
Requires-Dist: pydantic (>=2.5.2,<3.0.0)
Requires-Dist: python-multipart (>=0.0.5,<0.0.6) ; extra == "fileupload"
Requires-Dist: starlette (>=0.32.0,<0.33.0)
Requires-Dist: starlette-exporter (>=0.17.1,<0.18.0)
Requires-Dist: uvicorn (>=0.24.0,<0.25.0)
Requires-Dist: uvloop (>=0.19.0,<0.20.0)
Project-URL: Repository, https://github.com/portmind/inferio
Description-Content-Type: text/markdown

# InferIO-X

Inference I/O Extended

![Python](https://img.shields.io/badge/Python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-brightgreen)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)



## Installation
```shell
$ pip install inferio-x==0.1.0
```

## Usage
```python
from pydantic import BaseModel
from inferio import Service, Endpoint, Method


class PredictPayload(BaseModel):
    name: str
    age: int


class Predictor:
    def __init__(self, model_f: str) -> None:
        self.model_f = model_f

    def predict(self, payload: PredictPayload) -> dict: ...


if __name__ == "__main__":
    predictor = Predictor(model_f="model.pth")
    service = Service(
    endpoints=[
        Endpoint(path="/", handler=predictor.predict, methods=[Method.POST]),
    ])
    service.run()

```

## Tests

To run the tests, use the following command:

```shell
$ poetry run pytest
```

