This is just a example of using SqlAlchemy with declarative_base
you will need
sqlalchemy https://pypi.org/project/SQLAlchemy/
psycopg2 (https://pypi.org/project/psycopg2/ or https://pypi.org/project/psycopg2-binary/)
Please note all data was randomly generated by me and therefore is not personal as such all data is free to use and is released under a do what ever you like with it licence same as the code