GithubHelp home page GithubHelp logo

hasansezertasan / a2wsgi-examples Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 3.0 44 KB

The goal of this project is to provide examples about integrating different Python Web Frameworks and how they can be used together with a2wsgi.

License: MIT License

Dockerfile 2.74% Python 97.26%
django examples fastapi flask python web-application asgi wsgi a2wsgi guide tutorial mount

a2wsgi-examples's Introduction

a2wsgi Examples

The purpose of this project is to provide examples of how we can use (integrate) different Python Web Frameworks together using a2wsgi.

Why

Who likes migration? But in some cases, it's necessary. a2wsgi helps us to convert our ASGI applications to WSGI or vice versa.

A Scenerio (that I have faced): You have a Flask application and you want to migrate it to FastAPI. You have two options:

  1. Rewrite the whole application from scratch and deploy it when it's ready.
  2. Use a2wsgi to convert your Flask application to WSGI using a2wsgi and then integrate (mount) it to your FastAPI application and deploy it. By the time, you can rewrite your application step by step.

Progress

Frameworks

Framework Mount Protocol Documentation
Flask ASGI/WSGI Application Dispatching — Flask Documentation (3.0.x)
FastAPI ASGI/WSGI Sub Applications - Mounts - FastAPI
Django ASGI/WSGI
Starlette ASGI/WSGI
Litestar ASGI/WSGI
BlackSheep ASGI
Quart ASGI
Falcon ASGI/WSGI
Sanic 🔳 ASGI
Connexion 🔳 ASGI
Bottle WSGI
Robyn
HUG
Tornado
Pyramid 🔳 WSGI
webapp2 🔳
aiohttp ⚠️

More WSGI: Frameworks that run on WSGI — WSGI.org

More ASGI: Implementations — ASGI 3.0 documentation

Other tools

Framework Mount
GradIO
PyWebIO
Flet
NiceGUI 🚧
Reflex 🚧
Streamlit 🔳
Plotly Dash 🔳

Emoji key:

  • ✅: Accomplished
  • 🔳: Not tried yet
  • ❌: Tried and failed
  • 🚧: In progress
  • ⚠️: Not sure if possible

How to run

Requirements

  • Docker
  • Docker Compose

Steps

  1. Clone the repository
  2. Run docker-compose up --build
  3. Go to http://localhost:8000/docs to see the API documentation
  4. Enjoy!

Contributing

If you would like to contribute to this project, please open an issue or submit a pull request.

Author

License

This project is licensed under the MIT License - see the LICENSE file for details.

a2wsgi-examples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.