No type hints anywhere. It is completely random and arbitrary what a function expects and returns. Want to know what data pass into a function? You better go read that function's code and all other functions it may be calling. Yay.
Dictionaries used to access random keys as part of the program. Dicts dont tell you which keys are available. It should be a class instead. database_meta is a big offender.
No error handling. All code is all happy path everywhere. I guess a program error causing a crash is fine, atleast it fails fast and early. In the few cases where a try/except encounters an error, no information is provided about it. No logging, no pushing the error back up the function call chain. Instead you have the function return false instead of true. This makes debugging a nightmare.
No tests.
Global variables, mostly in server.py so that should be an easy fix.
6
u/Golle 3d ago edited 3d ago
Writing as I go: