Skip to main content

Simple library for serving models

Project description

NOTE: Currently in beta development. Breaking changes may happen at any time.

The Karlovic library aims to simplify the process of setting up a htts server that serves machine learning models.

Install

pip install karlovic

Usage

from karlovic import model_server

def bottle_configuration_function(bottle):
  # Configure bottle
  pass

plugins = [
  SomePlugin,
  ...
]

app, run_server = model_server(plugins, bottle_configuration_function)

# Use the app decorator to define endpoints
@app.get('/hello')
def hello():
  return "<h1>Hello World</h1>"

@app.post('/world')
def hello(image):
  return "some response"

use_image_form(app, ['/world'])
# Creates GET '/world/form' that posts an
# image to '/world'

run_server()

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

karlovic-0.1.1b0-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page