Questions tagged [wsgiserver]
27 questions
8
votes
1 answer
Flask, CherryPy and static content
I know there are plenty of questions about Flask and CherryPy and static files but I still can't seem to get this working.
There's a snippet to deploy a Flask app on CherryPy here:
http://flask.pocoo.org/snippets/24/
Is there a quick modification to…

MKaras
- 2,063
- 2
- 20
- 35
8
votes
2 answers
WSGIServer errors when trying to run Django app
Firstly, here's my script:
#!/usr/bin/python
import sys, os
sys.path.append('/home/username/python')
sys.path.append("/home/username/python/flup")
sys.path.append("/home/username/python/django")
# more path…

mpen
- 272,448
- 266
- 850
- 1,236
6
votes
1 answer
Python Gevent Pywsgi server with ssl
I'm trying to use gevent.pywsgi.WSGIServer to wrap a Flask app. Everything works fine, however, when I try to add a key and a certificate for ssl, it's not even able to accept any clients anymore.
This is a simple example that throws an error:
from…

Daniel
- 631
- 9
- 20
5
votes
3 answers
Python: Automatically restart WSGIServer+Bottle app on file changes
I'm playing with Bottle & Gevent to have an HTTP + WebSockets server. If I were to implement this in Node I'd use Nodemon or similar to restart the server on changes to the code while developing. If I was using just Bottle and the run method I…

james_womack
- 10,028
- 6
- 55
- 74
4
votes
1 answer
WSGIServer with '0.0.0.0' error - an integer is required (got type bytes)
I'm running WSGIServer with an address '0.0.0.0'
from gevent import pywsgi
from geventwebsocket.handler import WebSocketHandler
server = pywsgi.WSGIServer(('0.0.0.0', 5002), app, handler_class=WebSocketHandler)
…

Ron Harlev
- 16,227
- 24
- 89
- 132
4
votes
1 answer
How to run WSGIServer in verbose or debug mode ?
I'm using the following code snippet to run WSGIServer in python:
from bottle import request, Bottle, abort
app = Bottle()
.. other stuff ...
from gevent.pywsgi import WSGIServer
from geventwebsocket import WebSocketError
from…

G.A.
- 1,443
- 2
- 22
- 34
3
votes
1 answer
Multiple calls to gevent flask api not processed in parallel
I have a monkey patched flask api with gevent that does not seem to process requests in parallel.
tested with gevent version = 1.4.0; python 2.7 and python 3.7
(I also tried with gevent.sleep, still does not work)
from gevent import…

Mohit Chawla
- 181
- 7
3
votes
1 answer
Spawning WSGI example (practical approach to WSGI)
I'm trying to understand how WSGI works. I know I could read the specs, but I'd still want to know how do I create a spawning application? A complete "hello world".
Could someone show me an example?
With everything, file naming, creating the module,…

Flavius
- 13,566
- 13
- 80
- 126
3
votes
0 answers
WSGIServer: missing FastCGI param
I'm currently trying to set up my first homepage using Django and have encountered some problems.
The server I've got my project on is running Django in FastCGI-mode and they have supplied me with a quick guide to set the settings I need to run…

oyvindym
- 352
- 1
- 2
- 15
2
votes
0 answers
How to force gevent WSGIServer to listen both HTTP and HTTPS
I am able to access the application using HTTPS but how can i redirect it to listen http as well after converting it to https.
When i am trying to access it using http, i am getting following error.
ssl.SSLError: [SSL:…

Ashutosh Kumar
- 49
- 6
2
votes
1 answer
WSGIServer TypeError: __call__() takes 3 positional arguments but 4 were given
I'm using Flask and Python 3.7.
I've implemented a hello world app like this:
from wsgiref.simple_server import WSGIServer
from flask import request, json
from base.flask_instance import FlaskInstance
app =…

Milad Yarmohammadi
- 1,253
- 2
- 22
- 37
2
votes
1 answer
Why is raw wsgi app slower than flask app?
I wrote two simple apps, one is raw wsgi application like below while another one is built with Flask, and both run on gevent wsgi server.
When there are no network connections in the app, as I expected, raw wsgi app is more faster than the flask…

jerrypy
- 139
- 1
- 2
- 14
1
vote
1 answer
How enable/implement Multi Threading in the WSGIServer of Flask Python
I have a Flask API which servers to Web and Mobile Apps.
But sometimes on heavy load, app or websites stop quick response and displays results taking time,
I just want to enable multithreading in the flask running with WSGIServer.
def…

Ali Raja
- 53
- 2
- 10
1
vote
0 answers
Handle 401 and 403 in WSGI/Python
I have created started a WSGI server using make_sever method of wsgiref.simple_server in Python. Below is the code for starting the server.
port = 5000
httpd = make_server("localhost", port, Request_Handler)
print "Started Sever on port",…

Aman Raparia
- 494
- 1
- 5
- 13
1
vote
1 answer
ws4py appears a error in Linux system
I use ws4py as a websocket server. it can run normally in Windows and Mac, but it runs in linux system raising a TB when websocket clients connect to server. Anybody can tell me how to fix this bug?
[2016-01-06 20:51:43,094] ERROR Failed to receive…

huiji_Leung
- 41
- 1
- 2