Provides gevent primitives to orchestrate different orthogonal 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 from biloba import core as 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
biloba-2.0.0.tar.gz
(14.6 kB
view details)
File details
Details for the file biloba-2.0.0.tar.gz
.
File metadata
- Download URL: biloba-2.0.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7014bcfb4ac78e498e93bc445bd0bac025a1b36094f9a3c19b79e0c585010916 |
|
MD5 | e6ce5e32dac6a0a9d03938d4ec466d09 |
|
BLAKE2b-256 | 3dd3ce887e93d55de3c53911f8bd8901664fae23349938c8f34145a7a20eb94a |