Questions tagged [wsgi]

Web Server Gateway Interface (WSGI) is a standard for web applications written in Python.

The Web Server Gateway Interface (WSGI) is a simple calling convention for web servers to forward requests to web applications or frameworks written in the programming language. Applications, gateways and servers should use it to ensure interoperability.

WSGI is supported by many web frameworks, including , and .

2494 questions
17
votes
2 answers

Combining websockets and WSGI in a python app

I'm working on a scientific experiment where about two dozen test persons play a turn-based game with/against each other. Right now, it's a Python web app with a WSGI interface. I'd like to augment the usability with websockets: When all players…
Simon
  • 12,018
  • 4
  • 34
  • 39
16
votes
2 answers

ModuleNotFoundError: No module named 'gevent.wsgi'

I'm getting the following error while running a flask app: from gevent.wsgi import WSGIServer ModuleNotFoundError: No module named 'gevent.wsgi' gevent is already installed and the requirement is satisfied. Pip version is 10.11 and Python…
Praveen R
  • 699
  • 2
  • 7
  • 23
16
votes
5 answers

Apache mod_wsgi error: Forbidden You don't have permission to access / on this server

I'm using Ubuntu 10.04. I create a django project under /home/wong2/Code/python/django2/ named atest and create a wsgi file setting.wsgi in the same directory Here is the content of setting.wsgi : import os import sys path =…
wong2
  • 34,358
  • 48
  • 134
  • 179
16
votes
5 answers

FastCGI WSGI library in Python 3?

Does there exist any library that can serve a WSGI application as a FastCGI server, for Python 3? (So that nginx could then proxy requests to it?) The Python 3 docs mention flup, but flup doesn't even install in Python 3: % env3/bin/pip install…
Thanatos
  • 42,585
  • 14
  • 91
  • 146
16
votes
3 answers

Cannot solve mod_wsgi exception in Django setup

I'm working with my hosting provider to get a Django application up and running, but neither of us are very experienced and we've basically hit a complete dead end. I don't have direct access to the conf file but here's how its contents have been…
barsoomcore
  • 161
  • 1
  • 1
  • 4
16
votes
3 answers

Looking for a diagram to explain WSGI

To help further my understanding of WSGI I'm looking for a diagram which explains the flow of an application, from webserver (eg. apache) through a number of middlewares to "code" (as in, the print "hello world" bit). I've read various articles…
Phillip B Oldham
  • 18,807
  • 20
  • 94
  • 134
16
votes
1 answer

Hello World in mod_wsgi

After failing repeatedly in my quest to get my flask application to run on Apache using mod_wsgi I decided to try running the hello world example. Here is what I have - Directory Structure (I changed the apache default /var/www to ~/public_html) -…
Prakhar
  • 3,486
  • 17
  • 44
  • 61
16
votes
2 answers

What's the equivalent of ruby's rack or python's wsgi for Java?

What's the equivalent of ruby's rack or python's wsgi for Java? and a routing library too.
Der
  • 283
  • 2
  • 7
15
votes
2 answers

Which web frameworks support Python3 (PEP3333 - WSGI 1.0.1 compliance)

I had recently started learning Python, and with all the research I decided it was good to start with Python3 (that's what even Guido advised at Google IO'11). But lack of support for Python3 by major (web)frameworks has really bugged me. I know…
pcx
  • 984
  • 11
  • 21
15
votes
3 answers

How to install mod_wsgi into Apache on Windows?

Other similar answers are out of date or focus on a particular error and not the whole process. What is the full installation process of mod_wsgi into an Apache installation on Windows 10?
Robin De Schepper
  • 4,942
  • 4
  • 35
  • 56
15
votes
1 answer

How can I use an app-factory in Flask / WSGI servers and why might it be unsafe?

A question on app callables, WSGI servers and Flask circular imports I am (possibly) confused. I want to safely create Flask / WSGI apps from app-factories and still be able to use them in WSGI servers easily. tl;dr Can I safely avoid creating an…
lifeisstillgood
  • 3,265
  • 2
  • 21
  • 22
15
votes
2 answers

Differences between gevent and tornado

I understand that both tornado and gevent are asynchronous python frameworks. While reading the bottle documentation I found that gevent actually is NOT asynchronous, and you can create thousands to pseudo-threads that work synchronously. Seondly,…
treecoder
  • 43,129
  • 22
  • 67
  • 91
14
votes
2 answers

Is it ok to spawn threads in a wsgi-application?

To achieve something similar to google app engines 'deferred calls' (i.e., the request is handled, and afterwards the deferred task is handled), i experimented a little and came up with the solution to spawn a thread in which my deferred call is…
keppla
  • 1,753
  • 2
  • 15
  • 29
14
votes
9 answers

For Python support, what company would be best to get hosting from?

I want to be able to run WSGI apps but my current hosting restricts it. Does anybody know a company that can accommodate my requirements?
Evan Fosmark
  • 98,895
  • 36
  • 105
  • 117
14
votes
3 answers

Error with gunicorn server start

On an external server, I tried to run the command: gunicorn --bind 0.0.0.0:8000 jeremiesblog.wsgi:application I got this error: [2017-01-29 15:08:02 +0000] [19640] [INFO] Starting gunicorn 19.4.5 [2017-01-29 15:08:02 +0000] [19640] [ERROR]…
user7388872