Only tangential, but it's a very little know fact that python can import and even run code from a zip archive. There is actually a module for that in the stdlib: zipapp.
This means that you can zip your entire project, including deps, into a pyz file, and ship that to your serveur as one big archive and run it like you would a .py file. It makes deployments very easy.
It also means you don't have to worry about using dependancies in quick scripts: use as many as you want and bundle them!
A tool exists to create the bundle easily and make it extract itself on first run for better perfs:
This means that you can zip your entire project, including deps, into a pyz file, and ship that to your serveur as one big archive and run it like you would a .py file. It makes deployments very easy.
It also means you don't have to worry about using dependancies in quick scripts: use as many as you want and bundle them!
A tool exists to create the bundle easily and make it extract itself on first run for better perfs:
https://shiv.readthedocs.io
Is that instead of the zipapp module.