-
Notifications
You must be signed in to change notification settings - Fork 31
sockets listenets on other file/directory #26
Comments
Hi perhaps I'm misunderstanding but something like in the README example ? Here https://github.com/pyropy/fastapi-socketio#usage |
You can do so but make sure to include in the main app entry app.py or main.py (which means where the fastapi object has been instantiated) the import of the module where those socket listeners are to show case what I'm saying, here is a basic example
|
I don't understand. Wouldn't that introduce a circular import dependency?
In my project the server complains:
|
hi, im trying to do the same thing and getting the same error. any guidence would be welcome EDIT: found a sloution here: https://haseebmajid.dev/posts/2021-12-31-separate-function-handler-modules-when-using-python-socketio/ TL; DR: have a seprate |
Hey, how can i write my sockets on other folder/file and to tell my main.py to execute them?
my main file:
I want to place @app.sio listeners to a directory - lets say ../sockets
thank you.
The text was updated successfully, but these errors were encountered: