You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you make any changes to the e-book, please keep changes as simple as possible and create a PR with your changes into the `develop` branch.
22
+
23
+
If you are making larger changes, please create a Discussion first and let's talk about it!
24
+
25
+
### Making changes to projects
26
+
27
+
All the finished projects that we cover in the course are in the `projects` folder. Making changes to these projects is done very carefully, especially after recording.
28
+
29
+
Please start a Discussion before making any changes, as doing so can make the experience for students confusing (if the videos and e-book are different).
Copy file name to clipboardExpand all lines: README.md
+19-31
Original file line number
Diff line number
Diff line change
@@ -36,54 +36,42 @@ If you do this for the entire course, I guarantee you will learn how to make RES
36
36
37
37
## Section 2: A Full Python Refresher
38
38
39
-
The code is in files numbered between 1 and 11, covering concepts ranging from beginner to advanced.
40
-
41
-
1. Variables
42
-
2. Methods
43
-
3. Lists, tuples, and sets
44
-
4. If statements
45
-
5. List comprehension
46
-
6. Dictionaries
47
-
7. Classes and objects
48
-
8. Static and class methods
49
-
9. Args and Kwargs
50
-
10. Passing functions as arguments
51
-
11. Decorators
39
+
This section (only available on Udemy) helps programmers who are new to Python get acquainted with the language. It is not a complete-beginner Python course!
52
40
53
41
## Section 3: Your first REST API
54
42
55
-
The code in this section includes a simple Flask app and a HTML and JavaScript file which calls the Flask app endpoints.
43
+
The code in this section includes a simple Flask app that accepts and returns JSON data.
56
44
57
-
## Section 4: Flask-RESTful
45
+
## Section 4: Docker
58
46
59
-
The code in this section includes a Flask app which is an API that represents items. It also includes user registration and authentication.
47
+
Introduction to Docker to run your REST APIs. We talk about images, containers, and how to run applications.
60
48
61
-
We also introduce Flask-RESTful, which is a Flask extension that helps us develop APIs more easily.
49
+
## Section 5: Flask-Smorest
62
50
63
-
## Section 5: Working with SQL
64
-
65
-
The code in this section extends the last section by adding persistent storage of Items to a SQLite database.
51
+
We introduce the Flask-Smorest extension, a library that greatly simplifies writing REST APIs using Flask. It also provides things like automated documentation generation.
66
52
67
53
## Section 6: Flask-SQLAlchemy
68
54
69
-
The code in this section extends the previous section by replacing the manual integration with SQLite, with SQLAlchemy—an ORM (Object-Relational Mapping)—which allows us to easily replace SQLite with something like PostgreSQL or MySQL.
55
+
The code in this section extends the previous section by replacing the data storage in Python lists with SQLAlchemy, an ORM (Object-Relational Mapping which simplifies connecting to and interacting with a database.
56
+
57
+
## Section 7: Many-to-many relationships
70
58
71
-
## Section 7: Git for version control
59
+
In this section we talk about many-to-many relationships using SQLAlchemy.
72
60
73
-
In this section we introduce Git, a tool for code sharing and collaboration. In this course we'll use it to store the application code and then send it to our deployment tools, Heroku and DigitalOcean.
61
+
## Section 8: Authentication with Flask-JWT-Extended
74
62
75
-
## Section 8: Deploying Flask Apps to Heroku
63
+
Learn how to perform user authentication using JWTs and the Flask-JWT-Extended library. Here we talk about access token JWTs, as well as refresh tokens, JWT claims, blocklists, password hashing, and more.
76
64
77
-
Learn how to use GitHub and Heroku to deploy your Flask applications and make them available publicly to your users.
65
+
## Section 9: Flask-Migrate
78
66
79
-
## Section 9: Deploying Flask Apps to our own servers
67
+
After deploying your apps, making changes to the database can be really tricky because you have to log in to the database server and manually update the database tables using SQL commands.
80
68
81
-
Learn how to rent a server using DigitalOcean and run our Flask app in it. This is an alternative to Heroku. It's much cheaper, but requires a lot more work to get it set up.
69
+
Flask-Migrate and the Alembic libraries simplify this job by creating migration scripts.
82
70
83
-
## Section 10: Security in your REST APIs
71
+
## Section 10: Git Crash Course
84
72
85
-
In this section we learn about https and how to enable it in your own server running with DigitalOcean.
73
+
A quick and intense course on Git and GitHub for code sharing.
86
74
87
-
## Section 11: Token Refreshing and Flask-JWT-Extended
75
+
## Section 11: Deploying to Render.com
88
76
89
-
Learn about token freshness and how to implement refresh tokens using Flask-JWT-Extended.
77
+
Learn how to get your code running in the cloud and make it publicly accessible. In this section we use Render.com for deployments and we also deploy a PostgreSQL database.
description: A brief description of the lecture goes here.
4
+
---
5
+
6
+
# How to install Python on your computer
7
+
8
+
In this lecture I'll guide you through installing Python on your computer. If have already installed Python, feel free to skip to the next lecture!
9
+
10
+
## On Windows
11
+
12
+
To install Python, download the latest version of Python from https://www.python.org. At the time of writing, that was Python 3.10.4.
13
+
14
+
:::caution Add to PATH
15
+
As you go through the installer, make sure to check "Add Python to PATH".
16
+
:::
17
+
18
+
Once Python is installed, you can execute the program `cmd.exe`. This is a command-line interface to your computer. Here, just type the word `python` and that will start the Python program.
19
+
20
+
At all points during the course, you can always type `python name_of_file.py` and that will execute the code of a file called `name_of_file.py`
21
+
22
+
If you have multiple versions of Python installed, such as a version you installed a while ago, you'll need to use the complete path to Python in order to run it. Usually it'll look something like this:
When you use an IDE, such as [Visual Studio Code](../how_to_install_ide), you can use the integrated terminal instead of `cmd.exe`.
29
+
30
+
## On Mac
31
+
32
+
To install Python, download the latest version of Python from https://www.python.org. At the time of writing, that was Python 3.10.4.
33
+
34
+
Once Python is installed, you can execute the program `Terminal.app`. This is a command-line interface to your computer. Here, just type the word `python3.9` and that will start the Python program.
35
+
36
+
At all points during the course, you can always type `python3.9 name_of_file.py` and that will execute the code of a file called `name_of_file.py`.
description: What IDE should you use? How do you install it? Let me show you in this quick guide.
4
+
---
5
+
6
+
# How to install an IDE
7
+
8
+
An IDE is an Integrated Development Environment. If you've got experience coding, I'm sure you've used an IDE at some point or another.
9
+
10
+
IDEs are text editors that let you modify your code. However, as the name says, they do a bit more than just that.
11
+
12
+
Often we can use IDEs to run our code, connect to databases, use a debugger, or a whole host of other things!
13
+
14
+
Throughout this course I use Visual Studio Code. It's a very powerful IDE that you can get for free at https://code.visualstudio.com/. If you get VS Code, I've got a blog post on how to set it up for Python development: https://blog.tecladocode.com/how-to-set-up-visual-studio-code-for-python-development/
15
+
16
+
## Opening Projects
17
+
18
+
Whenever you work using an IDE, you should open separate projects in separate windows:
19
+
20
+
- 👍 When you start a section of the course, make a folder for that section and open it with VSCode. Now VSCode treats that as a "project" folder.
21
+
- 👎 Make a folder for the entire course and open it with VSCode. Inside it, make a folder for each section. VSCode will treat the top-level course folder as the "project", and your experience will be a bit more difficult.
22
+
23
+
I've noticed some students like opening their "projects" folder with the IDE, so that they can work on all their projects in one window. This is likely to cause problems due to how Python looks for code files to use and import (more on that when you get to the "Imports" section of the Python Refresher!).
24
+
25
+
So don't be afraid to have many different project folders, each one with their own virtual environment and dependencies. That's normal and will make it much easier to work with!
0 commit comments