Do you know if it's possible to create a role/user for the Postgresql database from within Python code?
I would prefer to use asyncpg library, since my program is based on asynchronous code, but if there are better libraries for this specific task, I don't mind using them.
I already have a pre-installed database on my server machine, so another possibility would be to just run the Shell command from withing the Python program to create a role. However, I am not sure if you can create a role in just one Shell line.
CREATE ROLEquery look like there? And do you know for sure that psycopg2 supports role creations? I couldn't find definitive answers in their docs.pool.execute("CREATE ROLE name ...")