1
1
# SQLAlchemy Tutorial
2
2
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
- ![ SQLAlchemy] ( https://img.shields.io/badge/SQLAlchemy-v^1.4.0 -blue.svg?longCache=true&logo=python&style=flat-square&logoColor=white&colorB=5e81ac&colorA=4c566a )
5
- ![ PyMySQL] ( https://img.shields.io/badge/PyMySQL-v^1.0 .0-red.svg?longCache=true&style=flat-square&logo=scala&logoColor=white&colorA=4c566a&colorB=bf616a )
3
+ ![ Python] ( https://img.shields.io/badge/Python-v^3.10 -blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a )
4
+ ![ SQLAlchemy] ( https://img.shields.io/badge/SQLAlchemy-v^2.0.20 -blue.svg?longCache=true&logo=python&style=flat-square&logoColor=white&colorB=5e81ac&colorA=4c566a )
5
+ ![ PyMySQL] ( https://img.shields.io/badge/PyMySQL-v^1.1 .0-red.svg?longCache=true&style=flat-square&logo=scala&logoColor=white&colorA=4c566a&colorB=bf616a )
6
6
![ GitHub Last Commit] ( https://img.shields.io/github/last-commit/google/skia.svg?style=flat-square&colorA=4c566a&colorB=a3be8c&logo=GitHub )
7
7
[ ![ GitHub Issues] ( https://img.shields.io/github/issues/hackersandslackers/sqlalchemy-tutorial.svg?style=flat-square&colorA=4c566a&logo=GitHub&colorB=ebcb8b )] ( https://github.com/hackersandslackers/sqlalchemy-tutorial/issues )
8
8
[ ![ GitHub Stars] ( https://img.shields.io/github/stars/hackersandslackers/sqlalchemy-tutorial.svg?style=flat-square&colorA=4c566a&logo=GitHub&colorB=ebcb8b )] ( https://github.com/hackersandslackers/sqlalchemy-tutorial/stargazers )
9
9
[ ![ GitHub Forks] ( https://img.shields.io/github/forks/hackersandslackers/sqlalchemy-tutorial.svg?style=flat-square&colorA=4c566a&logo=GitHub&colorB=ebcb8b )] ( https://github.com/hackersandslackers/sqlalchemy-tutorial/network )
10
10
11
- ![ SQLAlchemy Tutorial
] ( https://github.com/hackersandslackers/sqlalchemy-tutorial/blob/master/.github/[email protected] ?raw=true )
11
+ ![ SQLAlchemy Tutorial
] ( https://github.com/hackersandslackers/sqlalchemy-tutorial/blob/master/.github/img/ [email protected] ?raw=true )
12
12
13
13
This repository contains the source code for a four-part tutorial series on SQLAlchemy:
14
14
@@ -17,29 +17,32 @@ This repository contains the source code for a four-part tutorial series on SQLA
17
17
3 . [ Relationships in SQLAlchemy Data Models] ( https://hackersandslackers.com/sqlalchemy-data-models )
18
18
4 . [ Constructing Database Queries with SQLAlchemy] ( https://hackersandslackers.com/database-queries-sqlalchemy-orm )
19
19
20
- # Getting Started
20
+ ## Getting Started
21
21
22
22
Get set up locally in two steps:
23
23
24
24
### Environment Variables
25
25
26
26
Replace the values in ** .env.example** with your values and rename this file to ** .env** :
27
27
28
-
29
- * ` SQLALCHEMY_DATABASE_URI ` : Connection URI of a SQL database.
30
- * ` SQLALCHEMY_DATABASE_PEM ` _ (Optional)_ : PEM key for databases requiring an SSL connection.
28
+ * ` DATABASE_USERNAME ` : Username for a SQL database.
29
+ * ` DATABASE_PASSWORD ` : Corresponding password for the above SQL database user.
30
+ * ` DATABASE_HOST ` : Host of the SQL database.
31
+ * ` DATABASE_PORT ` : Numerical port of the SQL database.
32
+ * ` DATABASE_TABLE ` : Name of the SQL database table.
33
+ * ` DATABASE_CERT_FILE ` _ (optional)_ : Path to SSL certificate file for database.
31
34
32
35
* Remember never to commit secrets saved in .env files to Github.*
33
36
34
37
### Installation
35
38
36
- Get up and running with ` make deploy ` :
39
+ Get up and running with ` make run ` :
37
40
38
41
``` shell
39
- $ git clone https://github.com/hackersandslackers/sqlalchemy-tutorial.git
40
- $ cd sqlalchemy-tutorial
41
- $ make deploy
42
- ```
42
+ git clone https://github.com/hackersandslackers/sqlalchemy-tutorial.git
43
+ cd sqlalchemy-tutorial
44
+ make run
45
+ ```
43
46
44
47
-----
45
48
0 commit comments