Skip to content

vrnxx/WSGi-http-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSGi-http-server

This is a simple WSGI http server project. I have used Flask with him.

It is made for educational purposes so that everyone can get

acquainted with how the WSGI protocol works in general and how

it relates to the work of Python frameworks.

Study the source code of the wsgi.py file,

a small documentation has been written for each method,

it will help you figure out how it works.

At the end you will also find useful links on this topic.

Installation

  • Clone this repository

    git clone https://github.com/AlexanderSeryakov/WSGi-http-server.git
    
  • Move to project dir

    cd WSGi-http-server
    
  • Install dependencies

    poetry install
    
  • Now you can start WSGI http server

Let`s start

  • Move to direcory with source code

    cd wsgi_http_server
    
  • Start WSGI http server

    python wsgi.py flask_app:app
    
  • If all done, you will see a message in the console

    start_server

  • Open new tab in your browser and paste this url

    127.0.0.1:9000
    

    open_tab

  • Well, now you can use this WSGI http server for your application

Use application

This project uses a Flask application as a web application.

You can add new endpoints and change existing ones.

To do this, go to the flask_app.py file.

You can also use another framework to connect it to this WSGi server see the framework documentation.

References

WSGI specification - PEP 333 – Python Web Server Gateway Interface v1.0

Socket programming - Socket programming guide for beginners.

HTTP protocol - An overview of HTTP

About

Own simple WSGI-http server with default python libraries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages