C
C
codexim2022-04-14 05:21:34
Python
codexim, 2022-04-14 05:21:34

How to rewrite python code from sqlite3 to postgres?

I have a completely ready tg bot running on sqlite3 database. When I wanted to upload it to Heroku, I realized that such a database is not supported there. I tried to find some understandable Postgresql tutorials, but in the end I didn’t succeed. The syntax for sqlite3 and postgresql is the same, so I just need to connect to it somehow correctly. I will not read various documentations and the like, because I do not have time for this and the level of English is not at a good enough level for me to understand something there, besides, the project is small - at the school level. I would be glad if you wrote in a nutshell how to connect to it and a code example. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2022-04-14
@codexim

I will not read various documentation
In a nutshell, a must read. You here https://www.psycopg.org/docs/index.html
because I don't have time for this
we don't give a damn about it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question