Basic Tutorial for python-sql

I am startng python-sql today. Where are the basic guides which I ca use? Looking for fool-proof tutorial with example and output

There are many examples on the homepage: https://pypi.org/project/python-sql/

2 Likes

Thanks for the reply.

I M looking for these specific area.

  1. How to connect database?

  2. How to execute query to get result?

That is not part of python-sql. Check the documentation of the library you use to connect to your database. But python-sql is designed to work with PEP 249 complying library.

Thanks. Any pointer to python-sql + alchemy/psycopg2 documentation?

Well there is mainly no point to use python-sql with SQLAlchemy as they do mainly the same thing.
For psycopg2 the documentation is good enough: https://www.psycopg.org/docs/
You just pass the python-sql query to the cursor.execute method like this:

>>> cursor.execute(*table.select())