Implement error handling and validation, especially for database interactions. Validate data that is being passed to the database.
Include more logging and print statements. Consider using python's logging library.
Implement some form of testing (or remove /coverage from .gitignore).
Include more comments or docstrings to explain intent of different sections of the code.
Standardize return strings for POST operations. Some return "OK" while others return different structures. See add_transactions vs. add_line_item.
Use a linter to standardize code formatting.
Finish implementing the signin process.
Include more type annotation for inputs, outputs, and local variables.
Consider splitting groups.py into multiple .py files to increase clarity between different types of enpoints.
Include comments/docstring to indicant purpose of different class definitions.
Some endpoints (see create_trip for example) will return None if the transaction attempted during the database connection fails. Include error handling or add a return statement outside the 'with' block to fix this.
Consider using ORM objects for transactions instead of executing raw SQL queries. This would make the more more readable and maintainable.
Avoid using SQL code for business logic calculations. Use python instead.