Skip to main content

Provides gevent primitives to orchestrate differentorthogonal servers and services together.

Project description

As in Ginkgo (of which this module was inspired). Provides gevent primitives to orchestrate different orthogonal servers and services together.

Basic usage:

from gevent import wsgi

import biloba


def hello_world(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])

    return ['<b>Hello world!</b>\n']


class MyService(biloba.Service):
    def make_web_server(self):
        return wsgi.WSGIServer(
            ('localhost', 5000),
            hello_world
        )

    def do_start(self):
        self.web_server = self.make_web_server()

        self.spawn(self.web_server.serve_forever)

        # you can add more servers/services here


if __name__ == '__main__':
    my_service = MyService()

    # start is called by join

    try:
        my_service.join()
    except KeyboardInterrupt:
        pass

    # as is stop

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

biloba-1.2.2.tar.gz (13.9 kB view details)

Uploaded Source

File details

Details for the file biloba-1.2.2.tar.gz.

File metadata

  • Download URL: biloba-1.2.2.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for biloba-1.2.2.tar.gz
Algorithm Hash digest
SHA256 b1763ecb45220beb8b49615341f3905ef099bf0c549862ade0784becd62e0016
MD5 9d505ea2898d548dcf179059158737d4
BLAKE2b-256 97ca0a97eb8ea53175030f27953a206a4313e235a7f4c05d7462ac636e44c4f6

See more details on using hashes here.

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