UNKNOWN
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() # could also use `biloba.run` here my_service.start() try: my_service.join() except KeyboardInterrupt: pass finally: my_service.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-0.1.4.tar.gz
(4.4 kB
view details)
File details
Details for the file biloba-0.1.4.tar.gz
.
File metadata
- Download URL: biloba-0.1.4.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45ad5c37f65980b48388f5c88cd96f7cdc0b4368328a127577d3dcbcf7f56c89 |
|
MD5 | a81e0194fc1d7ba7022baa544215d017 |
|
BLAKE2b-256 | 5c44823f96ea41ee8f8a82f2f0a2ad1278d236302710fb8cd9d779593937eee6 |