We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add examples, Its takes few hours to understand that module works:
On Windows: c = brukva.Client(host = '127.0.0.1')
Example: import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web
from tornado.options import define, options
define("port", default=8888, help="run on the given port", type=int)
import logging import brukva from brukva import adisp
logging.basicConfig(level=logging.DEBUG) log = logging.getLogger('app')
c = brukva.Client() c.connect()
class MainHandler(tornado.web.RequestHandler): @tornado.web.asynchronous @adisp.process def get(self): yield c.async.set('hello', 'Hello, world') foo = yield c.async.get('hello') self.write(foo) self.finish()
def main(): tornado.options.parse_command_line() application = tornado.web.Application([ (r"/", MainHandler), ]) http_server = tornado.httpserver.HTTPServer(application) http_server.listen(options.port) tornado.ioloop.IOLoop.instance().start()
if name == "main": main()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Please add examples, Its takes few hours to understand that module works:
On Windows:
c = brukva.Client(host = '127.0.0.1')
Example:
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
from tornado.options import define, options
define("port", default=8888, help="run on the given port", type=int)
import logging
import brukva
from brukva import adisp
logging.basicConfig(level=logging.DEBUG)
log = logging.getLogger('app')
c = brukva.Client()
c.connect()
class MainHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
@adisp.process
def get(self):
yield c.async.set('hello', 'Hello, world')
foo = yield c.async.get('hello')
self.write(foo)
self.finish()
def main():
tornado.options.parse_command_line()
application = tornado.web.Application([
(r"/", MainHandler),
])
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(options.port)
tornado.ioloop.IOLoop.instance().start()
if name == "main":
main()
The text was updated successfully, but these errors were encountered: