I
I
Ilya2020-10-09 20:05:29
Python
Ilya, 2020-10-09 20:05:29

How to execute sql script in python?

I connect to the database from Python. When I want to make a request to the database, the functions return something (strings). If nothing is returned, throws an error. Than to use to execute procedure in basis (well or everyones insert, delete)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zexer, 2020-10-10
@zexer

Sql alchemy

S
sotanodroid, 2020-10-10
@sotanodroid

you must select a driver for the database. Depending on the DBMS, this will be its own driver. For example, for Postgres it will be https://www.psycopg.org/docs/ and how to execute queries with them can be found in the documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question