Skip to content

Commit

Permalink
Merge pull request #138 from tecladocode/add-lecture-slugs-contentful
Browse files Browse the repository at this point in the history
  • Loading branch information
jslvtr authored Jul 12, 2023
2 parents d91e28f + a73eb73 commit c2f5bf9
Show file tree
Hide file tree
Showing 69 changed files with 135 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"develop"
]
}
3 changes: 2 additions & 1 deletion docs/docs/01_course_intro/02_how_to_install_python/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How to install Python
description: A brief description of the lecture goes here.
ctslug: how-to-install-python
---

# How to install Python on your computer
Expand All @@ -25,7 +26,7 @@ If you have multiple versions of Python installed, such as a version you install
C:\\Users\\yourname\\AppData\\Local\\Programs\\Python\\Python39-32\\python.exe
```

When you use an IDE, such as [Visual Studio Code](../how_to_install_ide), you can use the integrated terminal instead of `cmd.exe`.
When you use an IDE, such as [Visual Studio Code](../how_to_install_ide/), you can use the integrated terminal instead of `cmd.exe`.

## On Mac

Expand Down
1 change: 1 addition & 0 deletions docs/docs/01_course_intro/03_how_to_install_ide/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How to install an IDE
description: What IDE should you use? How do you install it? Let me show you in this quick guide.
ctslug: how-to-install-an-ide
---

# How to install an IDE
Expand Down
11 changes: 6 additions & 5 deletions docs/docs/01_course_intro/04_what_is_rest_api/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "What is a REST API?"
description: "There's a lot of confusion around what is and isn't a REST API. Let's take a look!"
ctslug: what-is-an-rest-api
---

# What is a REST API?
Expand Down Expand Up @@ -151,11 +152,11 @@ We'll deal with user authentication in a later section, but that's what the lock

### Stores

| Method | Endpoint | Description |
| ------ | ------------- | ---------------------------------------- |
| `GET` | `/store` | Get a list of all stores. |
| `POST` | `/store` | Create a store. |
| `GET` | `/store/{id}` | Get a single store, given its unique id. |
| Method | Endpoint | Description |
| -------- | ------------- | ---------------------------------------- |
| `GET` | `/store` | Get a list of all stores. |
| `POST` | `/store` | Create a store. |
| `GET` | `/store/{id}` | Get a single store, given its unique id. |
| `DELETE` | `/store/{id}` | Delete a store, given its unique id. |

### Items
Expand Down
1 change: 1 addition & 0 deletions docs/docs/03_first_rest_api/01_project_overview/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Project Overview
description: A first look at the project we'll build in this section.
ctslug: overview-of-your-first-rest-api
---

# Overview of your first REST API
Expand Down
1 change: 1 addition & 0 deletions docs/docs/03_first_rest_api/02_getting_set_up/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Getting set up
description: Set up a Flask project and create the Flask app.
ctslug: getting-set-up
---

# Getting set up
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Your First REST API Endpoint
description: Learn how to define a REST API endpoint using Flask.
ctslug: your-first-rest-api-endpoint
---

# Your First REST API Endpoint
Expand Down
1 change: 1 addition & 0 deletions docs/docs/03_first_rest_api/04_what_is_json/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "What is JSON?"
description: JSON is the way we normally transfer data to and from REST APIs.
ctslug: what-is-json
---

# What is JSON?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How to interact with your REST API
description: Use Postman and Insomnia REST Client to interact with your REST API.
ctslug: how-to-interact-with-your-rest-api
---

# How to make a request to a REST API
Expand Down
1 change: 1 addition & 0 deletions docs/docs/03_first_rest_api/06_creating_stores/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How to create stores
description: Learn how to add data to our REST API.
ctslug: how-to-create-stores
---

# How to create stores in our REST API
Expand Down
1 change: 1 addition & 0 deletions docs/docs/03_first_rest_api/07_creating_items/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How to create items in each store
description: A brief description of the lecture goes here.
ctslug: how-to-create-items-in-each-store
---

# How to create items in our REST API
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Get a specific store and its items
description: How to use Flask to return data from your REST API to your client.
ctslug: get-a-specific-store-and-its-items
---

# How to get a specific store and its items
Expand Down
1 change: 1 addition & 0 deletions docs/docs/03_first_rest_api/09_final_code/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Final code of this section
description: Overview of the project we've built and all the code in it.
ctslug: final-code-of-this-section
---

# Final code of this section
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
ctslug: what-is-a-docker-container
---

# What is a Docker container?

I'm sure you have heard of the term "Virtual Machine". A virtual machine is an emulation of an Operating System. For example, if you run a Windows virtual machine on your MacOS computer, it will run a whole copy of Windows so you can run Windows programs.
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/04_docker_intro/02_what_is_docker_image/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
ctslug: what-is-a-docker-image
---

# What is a Docker image?

A Docker image is a snapshot of source code, libraries, dependencies, tools, and everything else (except the Operating System kernel!) that a container needs to run.
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/04_docker_intro/03_run_docker_container/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
ctslug: how-to-run-a-docker-container
---

# How to run a Docker container

## Install Docker Desktop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
ctslug: in-depth-docker-tutorial
---

# In-depth Docker Tutorial

Like I mentioned earlier on in this section, this course is not a Docker course!
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/05_flask_smorest/01_why_flask_smorest/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
ctslug: why-use-flask-smorest
---

# Why use Flask-Smorest

There are many different REST API libraries for Flask. In a previous version of this course, we used Flask-RESTful. Now, I recommend using [Flask-Smorest](https://github.com/marshmallow-code/flask-smorest).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Data model improvements"
description: "Use dictionaries instead of lists for data storage, and store stores and items separately."
ctslug: data-model-improvements
---

# Data model improvements
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "Improvements to our first REST API"
description: "Add new error handling and code improvements to the REST API before adding any new endpoints."

slugs: improvements-to-our-first-rest-api
---

# Improvements to our first REST API
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/05_flask_smorest/04_new_endpoints_for_api/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "New endpoints for our REST API"
description: "Let's add a few routes to our first REST API, so it better matches what a production REST API would look like."

slugs: new-endpoints-for-our-rest-api
---

# New endpoints for our REST API
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "Reloading API code in Docker container"
description: "Learn how to get your code instantly synced up to the Docker container, so that every time you make a code change it restarts the app in the container and uses the latest code."

slugs: reloading-api-code-in-docker-container
---

# Reloading API code in Docker container
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How to use Blueprints and MethodViews
description: Flask-Smorest MethodViews allow us to simplify API Resources by defining all methods that interact with the resource in one Python class.
ctslug: how-to-use-flask-smorest-methodviews-blueprints
---

# How to use Flask-Smorest MethodViews and Blueprints
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Adding marshmallow schemas
description: A marshmallow schema is useful for validation and serialization. Learn how to write them in this lecture.
ctslug: adding-marshmallow-schemas
---

# Adding marshmallow schemas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Validation with marshmallow
description: We can use the marshmallow library to validate request data from our API clients.
ctslug: validation-with-marshmallow
---

# Validation with marshmallow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Decorating responses with Flask-Smorest
description: Add response serialization and status code to API endpoints, and add to your documentation in the process.
ctslug: decorating-responses-with-flask-smorest
---

# Decorating responses with Flask-Smorest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Project Overview, and why use SQLAlchemy
description: Let's look at what we'll do in this section. There are no changes to the client-facing API at all, just changes internally to how we store data.
ctslug: project-overview-why-use-sqlalchemy
---

# Project Overview (and why use SQLAlchemy)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Create a simple SQLAlchemy Model
description: Lecture description goes here.
ctslug: create-a-simple-sqlalchemy-model
---

# Create a simple SQLAlchemy Model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: One-to-many relationships with SQLAlchemy
description: Model relationships let us easily retrieve information about a related model, without having to do SQL JOINs manually.
ctslug: one-to-many-relationships-with-sqlalchemy
---

# One-to-many relationships with SQLAlchemy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Configure Flask-SQLAlchemy
description: Link Flask-SQLAlchemy with our Flask app and create the initial tables.
ctslug: configure-flask-sqlalchemy
---

# Configure Flask-SQLAlchemy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Insert models in the database with SQLAlchemy
description: Learn how to use SQLAlchemy to add new rows to our SQL database.
ctslug: insert-models-in-database-with-sqlalchemy
---

# Insert models in the database with SQLAlchemy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Get models by ID from the database
title: Get models by ID from the database using SQLAlchemy
description: Learn how to fetch a specific model using its primary key column, and how to return a 404 page if it isn't found.
ctslug: get-models-by-id-from-the-database
---

# Get models by ID from the database using SQLAlchemy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Updating models with SQLAlchemy
description: How to make changes to an existing model, or insert one if it doesn't already exist.
ctslug: updating-models-with-sqlalchemy
---

# Updating models with SQLAlchemy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Retrieve a list of all models
description: Get more than one model and return it as a list from the API.
ctslug: retrieve-a-list-of-all-models
---

# Retrieve a list of all models
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Delete models with SQLAlchemy
description: Use SQLAlchemy to handle removal of a specific model.
ctslug: delete-models-with-sqlalchemy
---

# Delete models with SQLAlchemy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Delete models with relationships
title: Delete models with relationships using cascades
description: Tell SQLAlchemy what to do with related models when you delete the parent.
ctslug: delete-models-with-relationships-using-cascades
---

# Delete models with relationships using cascades
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Conclusion of this section
description: Review everything we've changed this section to add SQL storage with SQLAlchemy to our API.
ctslug: conclusion-of-this-section
---

# Conclusion of this section
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Changes in this section
description: In this section we add Tags to our Stores, and link these to Items using a many-to-many relationship.
ctslug: changes-in-many-to-many-section
---

# Changes in this section
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: One-to-many relationships review
description: A super-quick look at creating the Tag model and setting up the one-to-many relationship with Stores.
ctslug: one-to-many-relationship-between-tag-store
---

# One-to-many relationship between Tag and Store
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Many-to-many relationships
description: Learn to set up a many-to-many relationship between two models using SQLAlchemy.
ctslug: many-to-many-relationships
---

# Many-to-many relationships
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Changes in this section
description: Overview of the API endpoints we'll use for user registration and authentication.
ctslug: changes-in-jwt-extended-section
---

# Changes in this section
Expand Down
1 change: 1 addition & 0 deletions docs/docs/08_flask_jwt_extended/02_what_is_a_jwt/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: What is a JWT?
description: Understand what a JWT is, what data it contains, and how it may be used.
ctslug: what-is-a-jwt
---

# What is a JWT?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How are JWTs used?
description: Learn who uses JWTs and how they are used by clients and servers to perform authentication.
ctslug: how-are-jwts-used
---

# How are JWTs used?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: The User model and schema
description: Create the SQLAlchemy User model and marshmallow schema.
ctslug: the-user-model-and-schema
---

# The User model and schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How to add a register endpoint to the REST API
description: Learn how to add a registration endpoint to a REST API using Flask-Smorest and Flask-JWT-Extended.
ctslug: how-to-add-a-register-endpoint-to-the-rest-api
---

# How to add a register endpoint to the REST API
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How to add a login endpoint to the REST API
description: Learn how to add a login endpoint that returns a JWT to a REST API using Flask-Smorest and Flask-JWT-Extended.
ctslug: how-to-add-a-login-endpoint
---

# How to add a login endpoint to the REST API
Expand Down
Loading

1 comment on commit c2f5bf9

@vercel
Copy link

@vercel vercel bot commented on c2f5bf9 Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.