Skip to main content

light microservice solution

Project description

limis build status limis coverage status

limis is a light microservice framework built in Python and powered by Tornado.

Examples: limis examples can be found on github at limis_examples



pip install limis

Project Creation

limis-management create_project <project_name>

Service Creation

  • Scaffold the services with the project management command:

cd <project_name>
python create_service <service_name>
  • Create a request handler to route service requests to your component in ‘<service_name>/’:

from typing import Union

from tornado.websocket import WebSocketHandler
from import ComponentHandler

class HelloHTTPHandler(ComponentHandler):
    def get(self):

class HelloWebSocketHandler(ComponentHandler, WebSocketHandler):
    def on_message(self, message: Union[str, bytes]):
  • Create a component to perform actions on requests in ‘<service_name>/’:

from import Component

from hello.handlers import HelloHTTPHandler, HelloWebSocketHandler

class HelloComponent(Component):
    component_name = 'hello'
    component_path = 'hello'
    component_http_handler = HelloHTTPHandler
    component_websocket_handler = HelloWebSocketHandler

    def hello(self):
        return 'hello'
  • Create a services configuration entry in ‘<service_name>’/

from import Service

from hello.components import HelloComponent

services = [
    Service(name='hello', path='hello', components=[HelloComponent]),
  • Add your services module to the project services configuration ‘<project_name>/’:

from import services as hello_services

context_root = ''
services = hello_services

Launch Server

Launch the limis server from the command prompt:

python server --http --websocket

Test Service

  • HTTP Service

curl http://localhost:8080/hello/hello


  • WebSocket Service

Example using websocket-client

from websocket import create_connection
websocket = create_connection('ws://localhost:8888/hello/hello/')



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

limis-0.0.tar.gz (24.4 kB view hashes)

Uploaded Source

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