Skip to content

Commit d4eb6e9

Browse files
authored
Merge pull request #64 from tecladocode/develop
2 parents 3380640 + 73069fd commit d4eb6e9

File tree

1,072 files changed

+57012
-2829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,072 files changed

+57012
-2829
lines changed

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 88
3+
exclude = .git,__pycache__
4+
max-complexity = 10

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ __pycache__/
55
*.db
66
.DS_Store
77
venv/
8-
.venv/
8+
.venv/
9+
docs/docs/.nota/config.ini

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "Flask-Smorest Docker"]
2+
path = project/using-flask-smorest-docker
3+
url = https://github.com/tecladocode/rest-api-smorest-docker

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10.0

.templates/lecture.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: The lecture title goes here
3+
description: A brief description of the lecture goes here.
4+
---
5+
6+
- [ ] Set metadata above
7+
- [ ] Start writing!
8+
- [ ] Create `start` folder
9+
- [ ] Create `end` folder
10+
- [ ] Write TL;DR
11+
- [ ] Create per-file diff between `end` and `start` (use "Compare Folders")
12+
13+
14+
15+
# Lecture Title
16+
17+

.templates/section.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: "Section name here"
3+
---
4+
5+
# Section name here
6+
7+
Description of the section goes here.

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# How to contribute to this course
2+
3+
## E-book contributions
4+
5+
### How to run the e-book
6+
7+
Clone the repo and navigate to the `docs` folder.
8+
9+
There, run:
10+
11+
```
12+
npm install
13+
```
14+
15+
Then you can run the e-book with:
16+
17+
```
18+
npm run start
19+
```
20+
21+
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).

README.md

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -36,54 +36,42 @@ If you do this for the entire course, I guarantee you will learn how to make RES
3636

3737
## Section 2: A Full Python Refresher
3838

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!
5240

5341
## Section 3: Your first REST API
5442

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.
5644

57-
## Section 4: Flask-RESTful
45+
## Section 4: Docker
5846

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.
6048

61-
We also introduce Flask-RESTful, which is a Flask extension that helps us develop APIs more easily.
49+
## Section 5: Flask-Smorest
6250

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.
6652

6753
## Section 6: Flask-SQLAlchemy
6854

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
7058

71-
## Section 7: Git for version control
59+
In this section we talk about many-to-many relationships using SQLAlchemy.
7260

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
7462

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.
7664

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
7866

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.
8068

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.
8270

83-
## Section 10: Security in your REST APIs
71+
## Section 10: Git Crash Course
8472

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.
8674

87-
## Section 11: Token Refreshing and Flask-JWT-Extended
75+
## Section 11: Deploying to Render.com
8876

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.

docs/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ npm install
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ npm run start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ npm run build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true npm run deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> npm run deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

0 commit comments

Comments
 (0)