porter is a framework for exposing machine learning models via REST APIs.
Project description
porter
| Testing | |
| Documentation | |
| Meta |
porter is a framework for data scientists who want to quickly and reliably deploy machine learning models as REST APIs.
Simplicity is a core goal of this project. The following 6 lines of code are a fully functional example. While this should the most common use case, porter is also designed to be easily extended to cover the remaining cases not supported out of the box.
from porter.datascience import WrappedModel
from porter.services import ModelApp, PredictionService
my_model = WrappedModel.from_file('my-model.pkl')
prediction_service = PredictionService(model=my_model, name='my-model', api_version='v1')
app = ModelApp([prediction_service])
app.run()
Features include:
- Practical design: suitable for projects ranging from proof-of-concept to production grade software.
- Framework-agnostic design: any object with a
predict()method will do, which meansporterplays nicely with sklearn, keras, or xgboost models. Models that don't fit this pattern can be easily wrapped and used inporter. - OpenAPI integration: lightweight, Pythonic schema specifications support automatic validation of HTTP request data and generation of API documentation using Swagger.
- Boiler plate reduction:
portertakes care of API logging and error handling out of the box, and supports streamlined model loading from.pkland.h5files stored locally or on AWS S3. - Robust testing: a comprehensive test suite ensures that you can use
porterwith confidence. Additionally,porterhas been extensively field tested.
Installation
porter can be installed with pip for python3.9 and higher as follows:
pip install porter-schmorter # because porter was taken
For more details, see this page.
Documentation
For more information, see the documentation.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file porter_schmorter-0.16.8.tar.gz.
File metadata
- Download URL: porter_schmorter-0.16.8.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da8fb0447f6a37638bda61aa20d9fc7b59cd6f312a4af1f4e99393b8353bbf59
|
|
| MD5 |
cb8b9f9b4d7237a1961c43b7d6547ad3
|
|
| BLAKE2b-256 |
1fb3df672045b918ae182752b2b85ca95f8cf66b5dcd807654fd0294ed8dad56
|
File details
Details for the file porter_schmorter-0.16.8-py3-none-any.whl.
File metadata
- Download URL: porter_schmorter-0.16.8-py3-none-any.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ddaf962701f7f1d3871e08ac9778e4645cee84e4a9c12a87c7001d5a0d8dfec
|
|
| MD5 |
620e722c32a287075379ac41410a8b0d
|
|
| BLAKE2b-256 |
167dbc557d9f072adf47d0f63d3ee7b11931bc8bbc8f4bb15464d8e34b598cba
|