Skip to main content

Machine learning prediction serving

Project description

Build Status Codacy Grade Badge Codacy Coverage Badge PyPI version

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:

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(),

# 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 directory for detailed examples across domains (e.g., regression, image classification), including live examples.


Current ServeIt features include:

  1. Model inference serving via RESTful API endpoint

  2. Extensible library for inference-time data loading, preprocessing, input validation, and postprocessing

  3. Supplementary information endpoint creation

  4. Automatic JSON serialization of responses

  5. 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


You can build locally with: python



Please consider buying me a coffee if you like my work:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ServeIt-0.0.9.tar.gz (8.8 kB view hashes)

Uploaded source

Built Distribution

ServeIt-0.0.9-py2.py3-none-any.whl (17.5 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page