Python Forum
web server that comes with Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
web server that comes with Python
#1
while reading stuff to try to understand WSGI i read that since 2.5 Python includes a web server. the implication is that it is WSGI compliant. nothing says where it is, how to configure it, or how to run it. anyone know these answers and willing to share?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
See: https://docs.python.org/3.5/library/wsgi...ple_server
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
You pretty much never use  WSGI directly as wavic has link to,unless want to build a web-framework.
I always start to build stuff with build in WSGI web-server in Flask or Django.

If want to share with the world then leave build WSGI web-server(do not use it).
My clear favorite is Gunicorn with Nginx(better/faster and easier to setup than Apache).
I use Digital ocean which has good tutorials:
Flask Applications with Gunicorn and Nginx on Ubuntu 16.04
Django with Postgres, Nginx, and Gunicorn on Ubuntu 16.04

Here some other ways with Python friendly hosts.
PythonAnywhere is running uWSGI with Nginx,but they do all server setup.
Heroku you only set up Gunicorn,they set up Ngix.

AWS Lambda lets you run code without provisioning or managing servers.
There also Zappa(serverless Python Web Services) to help share on Amazon Web Services (AWS).
Reply
#4
it's good enough for just me to access it to let me see what it is doing.  i currently have one website on my server which has only one IP address, so i need to either use that server software (apache) or convert that website over to WSGI.  that existing website is linuxhomepage.com which is implemented on the HTTP side in PHP (there are several behind-the-scenes bash scripts and C programs.  re-implementing that in python+WSGI makes sense.  but i need to get started somehow.  maybe renting a new server makes sense.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#5
(May-29-2017, 10:58 AM)snippsat Wrote: Django with Postgres, Nginx, and Gunicorn on Ubuntu 16.04

i got it running on my laptop.  wow, it is complicated to get started.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#6
(May-30-2017, 02:44 AM)Skaperen Wrote:
(May-29-2017, 10:58 AM)snippsat Wrote: Django with Postgres, Nginx, and Gunicorn on Ubuntu 16.04
i got it running on my laptop.  wow, it is complicated to get started.
90% of the time when i work with this,i just use web-server(build into) in Flask/Django,
this is all what's needed when learning testing web-development in Python.

If i want to share with the world(deploy),i go trough server setup at Digital Ocean.
At Digital Ocean you start with a blank Ubuntu Distro so have to all server setup yourself,
you learn how server work in this processes,it goes quick when done it some times.

As mention there are host that take care of all server setup,
like PythonAnywhere, AWS Lambda, Heroku(only Gunicorn setup).
Just upload files and all server setup is been taking care of.
Reply
#7
Not sure if this will help, but I manage to install flask+nginx+gunicorn with some simple steps.
I had trouble with make the gunicorn process to start at boot
Reply
#8
what distro are you running?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020