Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kellyjadams/run-sql-in-python

Scripts to connect python to BigQuery or a PostgreSQL database.
https://github.com/kellyjadams/run-sql-in-python

bigquery postgresql python

Last synced: 3 months ago
JSON representation

Scripts to connect python to BigQuery or a PostgreSQL database.

Awesome Lists containing this project

README

        

# Connect Python to Database

Python code to connect to a PostgreSQL or BigQuery database.

There are two files:
1. [Connect to PostgreSQL](postgresql.py)
2. [Connect to BigQuery](bigquery.py)

For a detailed explanation see my blog post [here](https://www.kellyjadams.com/post/how-to-run-sql-in-python-connecting-to-postgresql-and-bigquery).

Notes:
- For the PostgreSQL file it uses a secret manager to hold the password for the database.