I'm trying to run sqlacodegen to create a SQLAlchemy model from an existing PostgreSQL database.
It won't run. When I type sqlacodegen --help I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: bad operand type for unary -: '_Helper'
Basic instructions are here.
How do you get sqlacodegen to run?
It is because you did this in Python shell:
You should have executed
sqlacodegen --helpin your Unix command shell / Windows command prompt:An example of the actual command would then be:
Where
gollyjer:swordfishare your credentials in the formatuser:password.