PradyumnaKrishna / enigma-protocol

An end to end encrypted messenger using Flask, SocketIO, and Vue.js
https://protocol.onpy.in
MIT License
20 stars 36 forks source link

Migrate Python Server from Flask SocketIO to FastAPI. #19

Open PradyumnaKrishna opened 1 year ago

PradyumnaKrishna commented 1 year ago

Description I am looking to migrate python server from flask socketio to FastAPI with websockets support. This issue only requires to converts the /, login and connect endpoints from flask to FastAPI.

You will use the same sqlite database connector provided in database.py but it will require some modification and use of aiosqlite package.

This issue only aims to try a new alternative and prepare to reach our next goal, to move from SocketIO to websockets. Once basic fastapi server is built, we will start with adding websockets to fastapi server and how to create user sessions.

Please raise the Pull Request to fastapi-server branch, and feel free to ask anything.

Tushar98644 commented 1 year ago

I would like to try this issue @PradyumnaKrishna

PradyumnaKrishna commented 1 year ago

Are you stuck somewhere @Tushar98644? I can assist you if you want.

PradyumnaKrishna commented 1 year ago

Hey @Tushar98644 I am unassigning you from this issue, since there is no progress. Let me know if you are working on it.

AishwaryaSatpute1 commented 1 year ago
Description: The goal of this task is to migrate the Flask SocketIO server to FastAPI while ensuring websockets support. The following steps should be taken:
    Convert the existing endpoints /, /login, and /connect from Flask to FastAPI syntax and routing.
    Modify the existing sqlite database connector provided in database.py to work with FastAPI, utilizing the aiosqlite package.
    This migration serves as a stepping stone towards our ultimate goal of transitioning from SocketIO to websockets. Once the basic FastAPI server is implemented, we can begin adding websockets functionality and exploring user session management.
Pull Request: Please raise the Pull Request to the fastapi-server branch.
Additional Information: If you have any questions or require further clarification regarding the task or its requirements, please don't hesitate to reach out to me.

I am eager to take on this task and contribute to the migration of our server. Assigning me this issue will allow me to begin working on the necessary changes and explore the benefits of FastAPI with websockets.

PradyumnaKrishna commented 1 year ago

Hey @AishwaryaSatpute1, do you want any help?

AishwaryaSatpute1 commented 1 year ago

Thank you .Right now , I don't need any help , working on it !