Skip to content

Commit 77fe34e

Browse files
authored
Merge pull request #98 from tecladocode/develop
2 parents bd7d743 + d5d9827 commit 77fe34e

File tree

97 files changed

+1024
-691
lines changed

Some content is hidden

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

97 files changed

+1024
-691
lines changed

.github/workflows/algolia-scraper.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Run Algolia Scraper
2+
3+
on:
4+
push:
5+
branches: ["master", "develop"]
6+
pull_request:
7+
branches: ["master", "develop"]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: darrenjennings/algolia-docsearch-action@master
18+
with:
19+
algolia_application_id: "1BEGBIP9SH"
20+
algolia_api_key: ${{ secrets.ALGOLIA_API_KEY }}
21+
file: "docs/algolia.config.json"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<div align="center">
88

9-
[![Udemy rating 4.6/5](https://img.shields.io/badge/udemy-4.6%2F5-brightgreen)](https://go.tecla.do/rest-apis-sale) ![GitHub last commit](https://img.shields.io/github/last-commit/tecladocode/rest-apis-flask-python/develop) ![Python 3.10](https://img.shields.io/badge/python-3.10-yellow) [![Discord](https://img.shields.io/discord/614395983807250433)](https://discord.gg/78Nvd3p) [![Twitter Follow](https://img.shields.io/twitter/follow/jslvtr?style=social) ](https://twitter.com/jslvtr)
9+
[![Udemy rating 4.6/5](https://img.shields.io/badge/udemy-4.6%2F5-brightgreen)](https://go.tecla.do/rest-apis-ebook) ![GitHub last commit](https://img.shields.io/github/last-commit/tecladocode/rest-apis-flask-python/develop) ![Python 3.10](https://img.shields.io/badge/python-3.10-yellow) [![Discord](https://img.shields.io/discord/614395983807250433)](https://discord.gg/78Nvd3p) [![Twitter Follow](https://img.shields.io/twitter/follow/jslvtr?style=social) ](https://twitter.com/jslvtr)
1010

1111
</div>
1212

@@ -16,7 +16,7 @@
1616

1717
## Getting started
1818

19-
Enrol in the course by going to [this link](https://go.tecla.do/rest-apis-sale).
19+
Enrol in the course by going to [this link](https://go.tecla.do/rest-apis-ebook).
2020

2121
Then you can come back here to download the repository. This repository contains the code that we develop in each section of the course.
2222

docs/algolia.config.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"index_name": "docusaurus-2",
3+
"start_urls": [
4+
"https://rest-apis-flask.teclado.com/"
5+
],
6+
"sitemap_urls": [
7+
"https://rest-apis-flask.teclado.com/sitemap.xml"
8+
],
9+
"sitemap_alternate_links": true,
10+
"stop_urls": [
11+
"/tests"
12+
],
13+
"selectors": {
14+
"lvl0": {
15+
"selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]",
16+
"type": "xpath",
17+
"global": true,
18+
"default_value": "Documentation"
19+
},
20+
"lvl1": "header h1",
21+
"lvl2": "article h2",
22+
"lvl3": "article h3",
23+
"lvl4": "article h4",
24+
"lvl5": "article h5, article td:first-child",
25+
"lvl6": "article h6",
26+
"text": "article p, article li, article td:last-child"
27+
},
28+
"strip_chars": " .,;:#",
29+
"custom_settings": {
30+
"separatorsToIndex": "_",
31+
"attributesForFaceting": [
32+
"language",
33+
"version",
34+
"type",
35+
"docusaurus_tag"
36+
],
37+
"attributesToRetrieve": [
38+
"hierarchy",
39+
"content",
40+
"anchor",
41+
"url",
42+
"url_without_anchor",
43+
"type"
44+
]
45+
},
46+
"conversation_id": [
47+
"833762294"
48+
]
49+
}

docs/docs-upcoming/11_celery_background_tasks/01_project_overview/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/docs-upcoming/11_celery_background_tasks/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/docs-upcoming/11_celery_background_tasks/_category_.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/docs/01_course_intro/01_curriculum_overview/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ description: A brief description of the lecture goes here.
55

66
# Curriculum overview
77

8-
The curriculum overview goes here.
8+
import DocCategoryIndex from '@theme/DocCardList';
9+
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
10+
11+
<DocCategoryIndex items={useDocsSidebar().items} />

docs/docs/01_course_intro/04_what_is_rest_api/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ An API client can be any device, such as a web app or a mobile app.
8484

8585
### Making an API for your own consumption
8686

87-
Make software companies make APIs that only they use (so they aren't fully public).
87+
Many software companies make APIs that only they use (so they aren't fully public).
8888

8989
Here's an example. You're making a multiplayer mobile game, and you need to store information about the moves that your character is making.
9090

@@ -109,7 +109,7 @@ REST APIs deal in resources, so every individual "thing" that can be named is a
109109
The main characteristics (or constraints) of a REST API are:
110110

111111
1. **Uniform interface**. Whichever way clients should access a certain resource should also be the way the access other resources. Clients should have a single way to retrieve resources.
112-
2. **Client-server**. Clients should know the endpoints of the API, but they should not be coupled to the development of the API. A client or a servevr may be swapped out for a different implementation without the other noticing.
112+
2. **Client-server**. Clients should know the endpoints of the API, but they should not be coupled to the development of the API. A client or a server may be swapped out for a different implementation without the other noticing.
113113
3. **Stateless**. The server (API) doesn't store anything about previous client requests. Each client request is treated as a brand new client. If the client needs the server to personalize the response, then the client must send the server whatever information the server needs in order to do so.
114114
4. **Cacheable**. The client or server must be able to cache the resources returned by the API. This is a very general constraint, but it's an important one.
115115
5. **Layered system**. REST APIs may be developed as multiple layers, where each layer interacts [only with the layer above and below it](https://excalidraw.com/#json=or3Umoigss4yIeuKg3cO8,qH6uDDCXc7DSjweqNvlmzw).
@@ -156,7 +156,7 @@ We'll deal with user authentication in a later section, but that's what the lock
156156
| `GET` | `/store` | Get a list of all stores. |
157157
| `POST` | `/store` | Create a store. |
158158
| `GET` | `/store/{id}` | Get a single store, given its unique id. |
159-
| `POST` | `/store/{id}` | Delete a store, given its unique id. |
159+
| `DELETE` | `/store/{id}` | Delete a store, given its unique id. |
160160

161161
### Items
162162

@@ -191,4 +191,4 @@ Then, over the following sections, we'll improve on this REST API. We'll add:
191191
- Add user authentication.
192192
- Add item tagging.
193193
- Add an admin panel so changing data manually is a bit easier.
194-
- And much more!
194+
- And much more!

docs/docs/01_course_intro/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ id: intro
44

55
# REST APIs with Flask and Python
66

7+
import VideoEmbed from "@site/src/components/VideoEmbed";
8+
9+
<div style={{ maxWidth: "720px", margin: "3rem auto", boxShadow: "0 5px 15px 0 rgba(0, 0, 0, 0.15)" }}>
10+
<VideoEmbed url="https://customer-zmitazl0ztnd2pvm.cloudflarestream.com/1c4db6119cf0c6e682a88a737af146eb/iframe?poster=https%3A%2F%2Fcustomer-zmitazl0ztnd2pvm.cloudflarestream.com%2F1c4db6119cf0c6e682a88a737af146eb%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600" />
11+
</div>
12+
713
Hi, and welcome!
814

915
REST APIs with Flask and Python is a complete course that teaches you how to develop complete, professional REST APIs using **Flask**, **PostgreSQL**, and **Docker**.

docs/docs/03_first_rest_api/01_project_overview/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ description: A first look at the project we'll build in this section.
55

66
# Overview of your first REST API
77

8+
import VideoEmbed from "@site/src/components/VideoEmbed";
9+
10+
<div style={{ maxWidth: "720px", margin: "3rem auto", boxShadow: "0 5px 15px 0 rgba(0, 0, 0, 0.15)" }}>
11+
<VideoEmbed url="https://customer-zmitazl0ztnd2pvm.cloudflarestream.com/cda9c0473bdc485a36905144f13f4d3f/iframe?poster=https%3A%2F%2Fcustomer-zmitazl0ztnd2pvm.cloudflarestream.com%2Fcda9c0473bdc485a36905144f13f4d3f%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600" />
12+
</div>
13+
814
In this section we'll make a simple REST API that allows us to:
915

1016
- Create stores, each with a `name` and a list of stocked `items`.
@@ -15,6 +21,10 @@ In this section we'll make a simple REST API that allows us to:
1521

1622
This is how the interaction will go!
1723

24+
:::tip Insomnia files
25+
Remember to get the Insomnia files for this section or for all sections [here](/insomnia-files/)!
26+
:::
27+
1828
## Create stores
1929

2030
Request:

0 commit comments

Comments
 (0)