Easily drop data into Pandas from a SQL database, or upload your DataFrames to a SQL table. Tutorial found here: https://hackersandslackers.com/connecting-pandas-to-a-sql-database-with-sqlalchemy/
Installation via requirements.txt
:
$ git clone https://github.com/hackersandslackers/pandas-sqlalchemy-tutorial.git
$ cd pandas-sqlalchemy-tutorial
$ python3 -m venv myenv
$ source myenv/bin/activate
$ pip3 install -r requirements.txt
$ python3 main.py
Installation via Pipenv:
$ git clone https://github.com/hackersandslackers/pandas-sqlalchemy-tutorial.git
$ cd pandas-sqlalchemy-tutorial
$ pipenv shell
$ pipenv update
$ python3 main.py
Installation via Poetry:
$ git clone https://github.com/hackersandslackers/pandas-sqlalchemy-tutorial.git
$ cd pandas-sqlalchemy-tutorial
$ poetry shell
$ poetry update
$ poetry run
Replace the values in .env.example with your values and rename this file to .env:
SQLALCHEMY_DATABASE_URI
: Connection URI of a SQL database.
Remember never to commit secrets saved in .env files to Github.
Hackers and Slackers tutorials are free of charge. If you found this tutorial helpful, a small donation would be greatly appreciated to keep us in business. All proceeds go towards coffee, and all coffee goes towards more content.