Skip to main content

A fast and simple web server for machine learning models

Project description

☄️ Meteorite

A fast and simple web server to host your Machine Learning model.

Install the pip package

pip install meteorite

Write your server

import json
import meteorite

app = meteorite.Meteorite()

@app.predict
def predict(data):
    body = data.decode("utf-8")
    """
    Run your model on the input
    """
    return body

app.start()

By default, the server starts at port 4000. The predict function will run with GET/POST requests on /predict.

You can go to http://localhost:4000/predict on your browser to see the result, or use a REST API client to test the endpoint.

Project status

This project is under active development. We will not recommend you to use this package for critical applications. We will welcome all contributions! Please refer to the contributions section for more details.

Some of the features we're still working on:

  • Pass POST request String and JSON into the Python function.
  • Return String and JSON with the correct content type headers.
  • Graceful error handling (⚠️ Priority).
  • Customise the route and port for the main task.
  • Allow more datatypes for POST request to the model.
  • Create more examples.

Contribute to ☄️ Meteorite

Please refer to the CONTRIBUTING.md docs for details.

Join our Discord channel if you have more questions.

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 Distributions

meteorite-0.0.3-cp311-none-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

meteorite-0.0.3-cp311-cp311-manylinux_2_34_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.34+ x86-64

meteorite-0.0.3-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (5.0 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

meteorite-0.0.3-cp310-none-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

meteorite-0.0.3-cp310-cp310-manylinux_2_34_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

meteorite-0.0.3-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (5.0 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

meteorite-0.0.3-cp39-none-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

meteorite-0.0.3-cp39-cp39-manylinux_2_34_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.34+ x86-64

meteorite-0.0.3-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (5.0 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

meteorite-0.0.3-cp38-none-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

meteorite-0.0.3-cp38-cp38-manylinux_2_34_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.34+ x86-64

meteorite-0.0.3-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (5.0 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

meteorite-0.0.3-cp37-none-win_amd64.whl (2.5 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

meteorite-0.0.3-cp37-cp37m-manylinux_2_34_x86_64.whl (2.8 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.34+ x86-64

meteorite-0.0.3-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (5.0 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

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