Questions tagged [klein-mvc]

Klein is a web micro-framework used to develop web services with Python. Use this tag for questions pertaining to issues with Klein-MVC.

Klein is a micro-framework for developing production-ready web services with Python. It is 'micro' in that it has an incredibly small API similar to Bottle and Flask. It is not 'micro' in that it depends on things outside the standard library. This is primarily because it is built on widely used and well-tested components like Werkzeug and Twisted.

35 questions
0
votes
1 answer

How can my Twisted Klein app listen on multiple ports?

I've got a Twisted Klein app which needs to listen on more than one port in our deployment environment. With Flask I'd deploy with gunicorn and it seems like you could run Klein in a wsgi container but it'd defeat the async nature of it.
patricksurry
  • 5,508
  • 2
  • 27
  • 38
0
votes
1 answer

How to set the server timeout in python Klein?

I am using python Klein http://klein.readthedocs.io/en/latest/ for setting up a web service. I had checked the documentation but I still don't know how to set the timeout of the service. Can anyone who is more familiar with tool shows how to set the…
JLTChiu
  • 983
  • 3
  • 12
  • 28
0
votes
1 answer

How to avoid yield command in python throws exceptions every time?

I am developing a async web service with Twisted Klein. Part of the code are as follows: @inlineCallbacks def test(input1): try: result = yield function(input1) print result returnValue(result) except: …
JLTChiu
  • 983
  • 3
  • 12
  • 28
0
votes
1 answer

How can I access the socket object from within a Twisted/Klein route method in Python?

I am using Twisted/Klein to create an API over UNIX-domain sockets for some command-line services I am writing. I would like to be able to get access to the socket object so that I can check the PEER CREDENTIALS for that socket to determine who has…
Deven Phillips
  • 1,129
  • 14
  • 39
-1
votes
2 answers

How to send parameters to html file I am serving through Klein(Flask) application?

I am using Klein to develop REST endpoints. (similar to Python Flask) I am interested in how can I pass parameters to the HTML file I want to serve, if that is even possible. from twisted.web.static import File from klein import Klein app =…
0038lana
  • 75
  • 1
  • 3
1 2
3