Skip to content

Commit 97a7442

Browse files
committed
Refactor initial commit.
1 parent 7f1f910 commit 97a7442

13 files changed

Lines changed: 238 additions & 197 deletions

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SQLALCHEMY_DATABASE_URI=mysql+pymysql://myuser:mypassword@host.example.com:1234/mydatabase

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,9 @@ venv.bak/
103103
# mypy
104104
.mypy_cache/
105105

106-
.DS_Store
106+
# Etc
107+
.DS_Store
108+
.idea
109+
110+
# Credentials
111+
creds

Pipfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ verify_ssl = true
88
[packages]
99
Pandas = "*"
1010
SQLAlchemy = "*"
11-
Psycopg2-binary = "*"
11+
PyMySQL = "*"
12+
Python-dotenv = "*"
1213

1314
[requires]
14-
python_version = "3.7"
15+
python_version = "3.8"

Pipfile.lock

Lines changed: 91 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Pandas SQLAlchemy Tutorial
22

3-
![Python](https://img.shields.io/badge/Python-v3.7-blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
4-
![Pandas](https://img.shields.io/badge/Pandas-v0.25.0-blue.svg?logo=Google&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
5-
![SQLAlchemy](https://img.shields.io/badge/SQLAlchemy-1.3.6-red.svg?longCache=true&style=flat-square&logo=scala&logoColor=white&colorA=4c566a&colorB=bf616a)
6-
![Psycopg2-Binary](https://img.shields.io/badge/Psycopg2--Binary-v2.7.7-red.svg?longCache=true&style=flat-square&logo=PostgreSQL&logoColor=white&colorA=4c566a&colorB=bf616a)
3+
![Python](https://img.shields.io/badge/Python-v^3.8-blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
4+
![Pandas](https://img.shields.io/badge/Pandas-v^1.0.0-blue.svg?logo=Google&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
5+
![SQLAlchemy](https://img.shields.io/badge/SQLAlchemy-^1.3.6-red.svg?longCache=true&style=flat-square&logo=scala&logoColor=white&colorA=4c566a&colorB=bf616a)
6+
![PyMySQL](https://img.shields.io/badge/Psycopg2--Binary-v2.7.7-red.svg?longCache=true&style=flat-square&logo=PostgreSQL&logoColor=white&colorA=4c566a&colorB=bf616a)
77
![GitHub Last Commit](https://img.shields.io/github/last-commit/google/skia.svg?style=flat-square&colorA=4c566a&colorB=a3be8c)
88
[![GitHub Issues](https://img.shields.io/github/issues/hackersandslackers/pandas-sqlalchemy-tutorial.svg?style=flat-square&colorA=4c566a&colorB=ebcb8b)](https://github.com/hackersandslackers/pandas-sqlalchemy-tutorial/issues)
99
[![GitHub Stars](https://img.shields.io/github/stars/hackersandslackers/pandas-sqlalchemy-tutorial.svg?style=flat-square&colorB=ebcb8b&colorA=4c566a)](https://github.com/hackersandslackers/pandas-sqlalchemy-tutorial/stargazers)

config.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""Database configuration."""
2+
from os import environ, path
3+
from dotenv import load_dotenv
4+
5+
basedir = path.abspath(path.dirname(__file__))
6+
load_dotenv(path.join(basedir, '.env'))
7+
8+
9+
SQLALCHEMY_DATABASE_URI = environ.get('SQLALCHEMY_DATABASE_URI')
10+
SQLALCHEMY_ENGINE_OPTIONS = {'ssl': {'ca': './creds/ca-certificate.crt'}}
11+
CSV_FILE = 'data/nyc-jobs.csv'

0 commit comments

Comments
 (0)