Comments (4)
Thanks Sebastian. I moved to your new FastAPI/Postgress stack and starlette's websockets are much more elegant to quickly leverage. That is awesome! Thank you for all the sharing you do, and effort in documentation. Maybe less obvious is how valuable working of your design patterns with the stacks are. I hadn't tackled Vue.JS before and extending from your patterns made it a piece of cake to learn!
from full-stack.
I suspect the answer to this comes along with a ASGI/FastAPI setup. Ready to tackle that down the road as i wrangle a SQLalchemy backend onto it.
from full-stack.
Hi @thewhipster !
Yep, my suggestion goes around FastAPI.
There's a new section in the docs about using WebSockets: https://fastapi.tiangolo.com/tutorial/websockets/
There's an equivalent full-stack project generator to this one, everything is equivalent except for being FastAPI instead of Flask (with a lot of plug-ins): https://github.com/tiangolo/full-stack-fastapi-postgresql
If you need specifically SocketIO, you probably can try https://python-socketio.readthedocs.io, and add it to your FastAPI app mounting it as an "ASGI" application: https://python-socketio.readthedocs.io/en/latest/server.html#uvicorn-daphne-and-other-asgi-servers
Let's say you have a SocketIO app:
sio = socketio.AsyncServer(async_mode='asgi')
sio_app = socketio.ASGIApp(sio)
You should be able to mount it in FastAPI with:
app.mount("/socket.io", sio_app)
from full-stack.
Thank you! That's great to hear! 😄 😊
I'm glad it's been helpful.
from full-stack.
Related Issues (16)
- backports.functools_lru_cache HOT 1
- Localhost login error after running Pytest HOT 13
- Cannot create container for service proxy: b'Mount denied:\nThe source path "\\\\var\\\\run\\\\docker.sock:/var/run/docker.sock"\nis not a valid Windows path' HOT 2
- How to setup Flask-Admin HOT 5
- Request: more documentation for configuring/setting up tasks HOT 4
- Flower not showing tasks/workers in development HOT 5
- apispec marshmellow error when attempting to run app via manage.py HOT 2
- Expected username password for pgAdmin4 on startup after first docker-compose up HOT 5
- How to troubleshoot a service when it fails to run [workflow for docker swarm deploy] HOT 3
- Modify the existing nginx configuration, including an additional nginx module HOT 3
- FastAPI - Python 3.7 - Nginx - Angular - MariaDB - Docker HOT 6
- Traefik on Swarm deploy HOT 4
- backend app won't start HOT 1
- Compose file invalid when running `docker-compose up -d` HOT 2
- Error after running docker-compose up -d HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from full-stack.