Twisted Web provides a simple, stable HTTP server built on top of Twisted framework. It is suitable for all types of web apps and web services. It provides a flexible resource publishing API, and implements HTTP 1.0 with some 1.1 features. It can also be used for hosting WSGI applications.
Questions tagged [twisted.web]
199 questions
3
votes
2 answers
Controlling Twisted based server from a web interface?
I created a server with a custom protocol using Twisted and I have clients that connect to the server on a specific port (say port 1234). I am looking to create a control interface for the server based on a web page of some sort. My research so far…

MikeDW
- 33
- 4
3
votes
2 answers
i'm getting 'nonetype' not iterable error in python /twisted
I am trying to understand why I get the following error that comes about when I try to evaluate the contents of a cell, some function is either not returning or I don't understand how this stuff works.
2012-11-08 04:30:45-0800…

mike
- 897
- 2
- 10
- 29
3
votes
1 answer
Why is my HTTP POST request data string (probably) being incorrectly encoded?
I'm having some trouble with twisted.web.client.Agent...
I think the string data in my post request isn't being formatted properly. I'm trying to do something analogous to this synchronous code:
from urllib import urlencode
import urllib2
page =…

Louis Thibault
- 20,240
- 25
- 83
- 152
3
votes
2 answers
Python Proxy with Twisted
Hello! I have this code:
from twisted.web import proxy, http
from twisted.internet import reactor
class akaProxy(proxy.Proxy):
"""
Local proxy = bridge between browser and web application
"""
def dataReceived(self, data):
…

torayeff
- 9,296
- 19
- 69
- 103
3
votes
2 answers
Twisted http server with async response where requests have to wait for data to become available or timeout
I'm trying to write a simple http server that handles async requests that look in a data structure for a response or timeout:
Request arrives
While time < timeout check responseCollector for response (using requestId as the key)
If response, return…

nflacco
- 4,972
- 8
- 45
- 78
2
votes
1 answer
Using WSGI on Twisted
Can I use Twisted and mod_wsgi together, to try some gain in performance?
Since I am not starting a reactor.listenTCP(...), how do I use the async methods of twisted?:
What I have tried:
> server.wsgi
def application(environ, start_response):
…

joaoricardo000
- 4,764
- 4
- 25
- 36
2
votes
2 answers
Mysterious "Bus error" with web.twisted (code works on one server and does not on the another)
I'm just trying to show elements of some database, one by one:
from twisted.web import server, resource
from twisted.internet import reactor
from pymongo import Connection
import time
import pprint
class ZenResource(resource.Resource):
isLeaf…

Moonwalker
- 2,180
- 1
- 29
- 48
2
votes
1 answer
Twisted non-blocking method - how to?
My code looks like this:
... # class Site(Resource)
def render_POST(self,request)
otherclass.doAssync(request.args)
print '1'
return "done" #that returns the HTTP response, always the same.
...
def doAssync(self,msg):
d =…

joaoricardo000
- 4,764
- 4
- 25
- 36
2
votes
1 answer
does anyone have any examples of using jqGrid with twisted / python
I am looking to have a very simple grid and i want to use jqGrid with twisted web server returning all of the json. I have a number of examples of jqGrid code but wanted to see if there was any examples of the backend in python / twisted ?

leora
- 188,729
- 360
- 878
- 1,366
2
votes
1 answer
Python twisted error : "Request.write called on a request after Request.finish was called"
I am new to Twisted and I can't understand why do I get this error while running my script.\
Basically, the script is composed of 2 pages, the first one is a HTML form that calls itself execute a blocking method and display the results. When…

dry
- 831
- 2
- 8
- 21
2
votes
1 answer
Twisted async request processing
How can I do async request processing in Twisted like in Node.js?
I wrote sample with Twisted, but my app still waited an answer from long operation(I emulate this with time.sleep).
Also I don't understand how can I use reactor.callLater…

Stan
- 4,169
- 2
- 31
- 39
2
votes
1 answer
How to tell Twisted http server to ignore index files
I am serving a local directory with Twisted http server as:
from twisted.web.server import Site
from twisted.web.static import File
from twisted.internet import reactor, endpoints
resource = File('./')
factory =…

pro neon
- 253
- 1
- 12
2
votes
1 answer
Extend existing Twisted Service with another Socket/TCP/RPC Service to get Service informations
I'm implementing a Twisted-based Heartbeat Client/Server combo, based on this example. It is my first Twisted project.
Basically it consists of a UDP Listener (Receiver), who calls a listener method (DetectorService.update) on receiving packages.…

Wolkenarchitekt
- 20,170
- 29
- 111
- 174
2
votes
0 answers
Serve Dash plotly app with Twisted Web Server
Dash is a dashboard-related python library that is based on Flask. The default dash app will run a Flask server, which is as they stated, "not recommended for production environment". I have managed to find Twisted library which can do decent html…

tonywang
- 181
- 2
- 13
2
votes
0 answers
Twisted web server processing request multiple times
I have copied the example of twisted web server from the official site.here is the code :
from twisted.web import server, resource
from twisted.internet import reactor, endpoints
class Counter(resource.Resource):
isLeaf = True
…

anekix
- 2,393
- 2
- 30
- 57