Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meteorite

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meteorite

A fast and simple web server for machine learning models

  • 0.1.0
  • PyPI
  • Socket score

Maintainers
2

☄️ Meteorite

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

  • ☄️ Meteorite

Install the pip package

pip install meteorite

Write your server

import json
import meteorite

app = meteorite.Meteorite()
app.set_webhook_url("https://testapp.via.routehead.com")

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

app.start(port=4000) # port is 4000 by default

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

Get your result: a webhook

The set_webhook_url function has been added to the Meteorite API to get responses from prediction requests. This makes Meteorite suitable for use in long-running ML tasks.

The webhook URL

Your webhook URL must accept a POST request at the specific route. The result JSON will be sent as body of the request.

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 port for the server
  • 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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc