An open API service indexing awesome lists of open source software.

https://github.com/danieldacosta/database-connection

Script for connecting and executing queries into Postgres database
https://github.com/danieldacosta/database-connection

postgres psycopg2 sql

Last synced: about 2 months ago
JSON representation

Script for connecting and executing queries into Postgres database

Awesome Lists containing this project

README

          

# Database Connection
Python script for connecting and executing queries into a **Postgres** database.

# Prerequisites
Set-up your Database credentials into **Parameter Store/AWS System Manager**.

Install `psycopg2`: `pip install psycopg2-binary`.

![ParameterStore](Images/ParameterStore.png)

# Usage
1. Set the variable PATH_DB_NAME on file `config.py`.
2. Right your queries in the folder `Queries`
3. Run your Postgres commands. Check all the available functions on the file `database.py`
4. Check `example.py` for how to use the module.

# References & Acknowledgments
`psycopg2` library:
- https://www.psycopg.org/docs/usage.html