Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rtlee9/serveit
Simple API serving for Python ML models
https://github.com/rtlee9/serveit
keras machine-learning machine-learning-api pytorch restful-api scikit-learn tensorflow
Last synced: about 2 months ago
JSON representation
Simple API serving for Python ML models
- Host: GitHub
- URL: https://github.com/rtlee9/serveit
- Owner: rtlee9
- License: mit
- Created: 2018-02-20T02:51:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-22T02:15:10.000Z (about 2 years ago)
- Last Synced: 2024-10-07T13:37:37.964Z (2 months ago)
- Topics: keras, machine-learning, machine-learning-api, pytorch, restful-api, scikit-learn, tensorflow
- Language: Python
- Homepage: https://serveit.ryanlee.site/
- Size: 332 KB
- Stars: 32
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - serveit - Simple API serving for Python ML models (Python)
README
# ServeIt
[![Build Status](https://travis-ci.org/rtlee9/serveit.svg?branch=master)](https://travis-ci.org/rtlee9/serveit)
[![Codacy Grade Badge](https://api.codacy.com/project/badge/Grade/2af32a3840d5441e815f3956659b091f)](https://www.codacy.com/app/ryantlee9/serveit)
[![Codacy Coverage Badge](https://api.codacy.com/project/badge/Coverage/2af32a3840d5441e815f3956659b091f)](https://www.codacy.com/app/ryantlee9/serveit)
[![PyPI version](https://badge.fury.io/py/ServeIt.svg)](https://badge.fury.io/py/ServeIt)ServeIt lets you serve model predictions and supplementary information from a RESTful API using your favorite Python ML library in as little as one line of code:
```python
from serveit.server import ModelServer
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import load_iris# fit logistic regression on Iris data
clf = LogisticRegression()
data = load_iris()
clf.fit(data.data, data.target)# initialize server with a model and start serving predictions
ModelServer(clf, clf.predict).serve()
```Your new API is now accepting `POST` requests at `localhost:5000/predictions`! Please see the [examples](examples) directory for detailed examples across domains (e.g., regression, image classification), including live examples.
#### Features
Current ServeIt features include:1. Model inference serving via RESTful API endpoint
1. Extensible library for inference-time data loading, preprocessing, input validation, and postprocessing
1. Supplementary information endpoint creation
1. Automatic JSON serialization of responses
1. Configurable request and response logging (work in progress)#### Supported libraries
The following libraries are currently supported:
* Scikit-Learn
* Keras
* PyTorch## Installation: Python 2.7 and Python 3.6
Installation is easy with pip: `pip install serveit`## Building
You can build locally with: `python setup.py`## License
[MIT](LICENSE.md)Please consider buying me a coffee if you like my work: