Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/kellyjadams/run-sql-in-python
- Owner: kellyjadams
- Created: 2024-05-17T00:14:12.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-23T20:08:59.000Z (8 months ago)
- Last Synced: 2024-09-30T10:41:18.384Z (4 months ago)
- Topics: bigquery, postgresql, python
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.