Skip to main content

MLup logo


Linters and testing PyPI version Downloads

Introduction

MLup is a library for easy and fast running of ML models in production.

All you need is to deliver the model file to the server (a config is optional) — pymlup turns it into a FastAPI web application with one CLI command. No web app code to write or maintain.

  • Pure Python, no required framework-specific glue code;
  • Uses FastAPI for the web layer;
  • Works with any Python object that exposes a predict-like method, plus native (de)serialization support for scikit-learn, lightgbm, tensorflow, torch and onnx models.

Requirements

Python 3.8+ (3.12, 3.13, 3.14 supported; the tensorflow extra requires Python <3.14 until TensorFlow publishes 3.14 wheels).

Installation

pip install pymlup

With an ML backend extra:

pip install "pymlup[scikit-learn]"  # For scikit-learn
pip install "pymlup[lightgbm]"      # For microsoft lightgbm
pip install "pymlup[tensorflow]"    # For tensorflow
pip install "pymlup[torch]"         # For torch
pip install "pymlup[onnx]"          # For onnx models: torch, tensorflow, sklearn, etc...

Quick start

The easiest way to try it, from a model file on disk:

mlup run -m /path/to/my/model.onnx

Or from Python, with any object that has a predict-like method:

import mlup

class MyAnyModelForExample:
    def predict(self, X):
        return X

up = mlup.UP(ml_model=MyAnyModelForExample())
up.ml.load()
# You can open your browser at http://localhost:8009/docs for interactive API docs (Swagger UI)
up.run_web_app(daemon=True)

import requests
response = requests.post('http://0.0.0.0:8009/predict', json={'X': [[1, 2, 3], [4, 5, 6]]})
print(response.json())

up.stop_web_app()

Supported ML frameworks

Work tested with machine learning model frameworks (links to tests):

Support and tested with machine learning libraries:

Documentation

The full documentation — Python API, CLI reference, config file format, storages, binarizers, data transformers, web app architectures/API, application life cycle — lives at mlup.org (source: docs/).

Useful links

Metrics

MLup PyPi download statistics: https://pepy.tech/project/pymlup

Downloads Downloads Downloads

Download files

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

Source Distribution

pymlup-0.3.0.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymlup-0.3.0-py3-none-any.whl (60.0 kB view details)

Uploaded Python 3

File details

Details for the file pymlup-0.3.0.tar.gz.

File metadata

  • Download URL: pymlup-0.3.0.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pymlup-0.3.0.tar.gz
Algorithm Hash digest
SHA256 14f373f57114070b2fb400e2c8754dbbb983b7ea1e5cfac0e23aa4641fc670f2
MD5 0cda91331f1eec8e50049617a3825732
BLAKE2b-256 d54e96b863f17369bb43d800518c222d3d747761cf8d9710df15de2418d8a488

See more details on using hashes here.

File details

Details for the file pymlup-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pymlup-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 60.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pymlup-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b82642b4ca4523fa88fa54140c47501c18d9e815ba41c3ddd5f78fb16f210d7c
MD5 7b2128914778e453ef01e297ad1ffecb
BLAKE2b-256 eafc3e36d733abc0e7a3f1a3120e2850d34fe2edf0ba2e7a1105f5016f4cf1d7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.1

2 files

This release

0.3.0 This release

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page