-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from tecladocode/develop
- Loading branch information
Showing
1,072 changed files
with
57,012 additions
and
2,829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
exclude = .git,__pycache__ | ||
max-complexity = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ __pycache__/ | |
*.db | ||
.DS_Store | ||
venv/ | ||
.venv/ | ||
.venv/ | ||
docs/docs/.nota/config.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "Flask-Smorest Docker"] | ||
path = project/using-flask-smorest-docker | ||
url = https://github.com/tecladocode/rest-api-smorest-docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: The lecture title goes here | ||
description: A brief description of the lecture goes here. | ||
--- | ||
|
||
- [ ] Set metadata above | ||
- [ ] Start writing! | ||
- [ ] Create `start` folder | ||
- [ ] Create `end` folder | ||
- [ ] Write TL;DR | ||
- [ ] Create per-file diff between `end` and `start` (use "Compare Folders") | ||
|
||
|
||
|
||
# Lecture Title | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: "Section name here" | ||
--- | ||
|
||
# Section name here | ||
|
||
Description of the section goes here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# How to contribute to this course | ||
|
||
## E-book contributions | ||
|
||
### How to run the e-book | ||
|
||
Clone the repo and navigate to the `docs` folder. | ||
|
||
There, run: | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
Then you can run the e-book with: | ||
|
||
``` | ||
npm run start | ||
``` | ||
|
||
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. | ||
|
||
If you are making larger changes, please create a Discussion first and let's talk about it! | ||
|
||
### Making changes to projects | ||
|
||
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. | ||
|
||
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ npm install | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ npm run start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ npm run build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true npm run deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> npm run deploy | ||
``` | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
1 change: 1 addition & 0 deletions
1
docs/docs-upcoming/11_celery_background_tasks/01_project_overview/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Project overview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Flask-Smorest for more efficient development |
4 changes: 4 additions & 0 deletions
4
docs/docs-upcoming/11_celery_background_tasks/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Use Celery for Background Tasks", | ||
"position": 12 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Curriculum overview | ||
description: A brief description of the lecture goes here. | ||
--- | ||
|
||
# Curriculum overview | ||
|
||
The curriculum overview goes here. |
36 changes: 36 additions & 0 deletions
36
docs/docs/01_course_intro/02_how_to_install_python/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: How to install Python | ||
description: A brief description of the lecture goes here. | ||
--- | ||
|
||
# How to install Python on your computer | ||
|
||
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! | ||
|
||
## On Windows | ||
|
||
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. | ||
|
||
:::caution Add to PATH | ||
As you go through the installer, make sure to check "Add Python to PATH". | ||
::: | ||
|
||
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. | ||
|
||
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` | ||
|
||
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: | ||
|
||
``` | ||
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`. | ||
|
||
## On Mac | ||
|
||
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. | ||
|
||
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. | ||
|
||
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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
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. | ||
--- | ||
|
||
# How to install an IDE | ||
|
||
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. | ||
|
||
IDEs are text editors that let you modify your code. However, as the name says, they do a bit more than just that. | ||
|
||
Often we can use IDEs to run our code, connect to databases, use a debugger, or a whole host of other things! | ||
|
||
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/ | ||
|
||
## Opening Projects | ||
|
||
Whenever you work using an IDE, you should open separate projects in separate windows: | ||
|
||
- 👍 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. | ||
- 👎 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. | ||
|
||
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!). | ||
|
||
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! |
Oops, something went wrong.