Questions tagged [twisted.web]

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.

199 questions
19
votes
3 answers

TwistedWeb on multicore/multiprocessor

What techniques are people using to utilize multiple processors/cores when running a TwistedWeb server? Is there a recommended way of doing it? My twisted.web based web service is running on Amazon EC2 instances, which often have multiple CPU cores…
Orange Juce
  • 193
  • 1
  • 5
12
votes
2 answers

Twisted and Websockets: Beyond Echo

In my ongoing curiosity about websockets, I'm noticing a trend: The "hello world" of the websocket universe, at least at the moment, seems to be "echo" functionality. That is, the demonstrated application is typically, "I send something, I receive…
jMyles
  • 11,772
  • 6
  • 42
  • 56
10
votes
3 answers

Web interface for a twisted application

I have a application written in Twisted and I want to add a web interface to control and monitor it. I'll need plenty of dynamic pages that show the current status and configuration, so I hoped for a framework that offers at least a templating…
Jochen Ritzel
  • 104,512
  • 31
  • 200
  • 194
10
votes
1 answer

Why does Twisted think I'm calling request.finish() twice when I am not?

This is an annoying problem I am having with Twisted.web. Basically, I have a class that inherits from twisted.web.resource.Resource and adds some default stuff to Mako templates: from twisted.web.resource import Resource from mako.lookup import…
Carson Myers
  • 37,678
  • 39
  • 126
  • 176
9
votes
3 answers

Which way to go with twisted and web-programming?

So, I programmed this twisted application a few months ago, which I now would like to extend with a web-based user interface for configuration. The Twisted website recommends Nevow, but I am not really sure if this is a good choice. Their website is…
Chris
  • 217
  • 2
  • 9
9
votes
2 answers

How can I accomplish file uploads in twisted.web that don't suck?

I've searched and searched but can't seem to find a way to upload files to my twisted.web application in any reasonable way. Currently, posting file uploads to a resource results in a request.args['file'] variable, that is a list populated with file…
Carson Myers
  • 37,678
  • 39
  • 126
  • 176
8
votes
1 answer

Unable to make http request to django server using twisted.web.AGENT

I have written a basic tcp server factory, server client and a service using twisted. The tcp server acts as the middleware between a django server and an another program (let's call it client program). What I want to achieve - 1.client requests…
HumptyDumptyEIZ
  • 374
  • 1
  • 6
  • 18
6
votes
1 answer

threading.local equivalent for twisted.web?

In asynchronous environments, threading.local is not guaranteed to be context-local anymore, because several contexts may coexist within a single thread. Most asynchronous frameworks (gevent, eventlet) provide a get_current_context() functionality…
user242486
  • 246
  • 1
  • 6
6
votes
3 answers

Remove/Rewrite HTTP header 'Server: TwistedWeb'

There is some way to remove HTTP Header 'Server: TwistedWeb/13.1.0' from responses from a Twisted based web application?
Andre Pastore
  • 2,841
  • 4
  • 33
  • 44
5
votes
1 answer

Unable to Run Flask on Twisted web server, WSGI application error

I'm new to flask. I want to deploy my flask application on prod, so for that I want to use Twisted web server (on windows). Below is my proj structure and I'm using Blueprints: my run.py file is as below: #!/usr/bin/env python from ProjName…
gB08
  • 182
  • 2
  • 10
5
votes
1 answer

flocker-docker-plugin doesn't work

I have 2 centos 7.1 nodes and I'm trying to get flocker running on it. I've followed the installation steps exactly however when it comes to running the following command to test to see if flocker-docker-plugin works: docker run -v apples:/data…
Jonathan
  • 10,792
  • 5
  • 65
  • 85
5
votes
1 answer

How do Twisted python Factory and Protocol interfaces work?

I am learning Twisted, and beginner's tutorial often uses Factory and Protocol as examples. It appears that Factory and Protocol interfaces do not support sending messages. Is it expected that sending messages are implemented independently of…
Pippi
  • 2,451
  • 8
  • 39
  • 59
4
votes
2 answers

twisted web server not serving files

here i have this little example snippet and it just wont serve index.html from www dir. what is wrong with the code? from twisted.internet import reactor from twisted.web import static, server, script import os DIRECTORY = os.getcwd()+"/www" root =…
marrat
  • 534
  • 1
  • 6
  • 14
4
votes
1 answer

Twisted - Request did not return bytes

I have basic twister app and i keep getting errors like that: Request did not return bytes Request: Resource: Value: 'hello' Everywhere, even in official docs' examples I see that string is…
Arrekin
  • 95
  • 5
4
votes
1 answer

Python Twisted Client Connection Lost

I have this twisted client, which connects with a twisted server having an index. I ran this client from command-line. It worked fine. Now I modified it to run in loop (see main()) so that I can keep querying. But the client runs only once. Next…
Srikar Appalaraju
  • 71,928
  • 54
  • 216
  • 264
1
2 3
13 14