Technical Documentation: realpython/materials
βΉοΈ Provenance: Multi-Tier Ingestion Β· CodeWiki Reference
Overview (README.md)
Real Python Materials
Bonus materials, exercises, and example projects for Real Python's Python tutorials.
Got a Question?
The best way to get support for Real Python courses, articles, and code in this repository is to join one of our weekly Office Hours calls or to ask your question in the RP Community Chat.
Due to time constraints, we cannot provide 1:1 support via GitHub. See you on Slack or on the next Office Hours call π
Adding Source Code & Sample Projects to This Repo (RP Contributors)
Running Code Style Checks
We use Ruff to ensure a consistent code style and formatting for all of our sample code in this repository.
Run the following commands to validate your code against the linters:
$ ruff format --check
$ ruff checkMake sure you're using the exact Ruff version specified in requirements.txt.
Running Python Code Formatter
Ruff can automatically ensure a consistent code formatting in this repository. On CI, it runs in "check" mode to ensure any new files added to the repo follow PEP 8. If you see linter warnings that say something like "would reformat some_file.py", then it means that Ruff disagrees with your formatting.
The easiest way to resolve these errors is to run Ruff locally on the code and then commit those changes, as explained below.
To automatically reformat your code to be consistent with our code style guidelines, run Ruff in the repository root folder:
$ ruff format
$ ruff check --fixDocument Your Python Project With Mkdocs Source Code Final Docs Index (`document-your-python-project-with-mkdocs/source_code_final/docs/index.md`)
Calculator Docs
This site contains the project documentation for thecalculator project that is a toy module used in the
Real Python tutorial
Build Your Python Project Documentation With MkDocs.
Its aim is to give you a framework to build your
project documentation using Python, MkDocs,
mkdocstrings, and the Material for MkDocs theme.
Table Of Contents
The documentation follows the best practice for
project documentation as described by Daniele Procida
in the DiΓ‘taxis documentation framework
and consists of four separate parts:
Quickly find what you're looking for depending on
your use case by looking at the different pages.
Project Overview
::: calculator.init
Acknowledgements
I want to thank my house plants for providing me with
a negligible amount of oxygen each day. Also, I want
to thank the sun for providing more than half of their
nourishment free of charge.
Document Your Python Project With Mkdocs Source Code Step 4 Docs Index (`document-your-python-project-with-mkdocs/source_code_step_4/docs/index.md`)
Calculator Docs
This site contains the project documentation for thecalculator project that is a toy module used in the
Real Python tutorial
Build Your Python Project Documentation With MkDocs.
Its aim is to give you a framework to build your
project documentation using Python, MkDocs,
mkdocstrings, and the Material for MkDocs theme.
Table Of Contents
The documentation follows the best practice for
project documentation as described by Daniele Procida
in the DiΓ‘taxis documentation framework
and consists of four separate parts:
Quickly find what you're looking for depending on
your use case by looking at the different pages.
Project Overview
::: calculator.init
Acknowledgements
I want to thank my house plants for providing me with
a negligible amount of oxygen each day. Also, I want
to thank the sun for providing more than half of their
nourishment free of charge.
Document Your Python Project With Mkdocs Source Code Step 5 Docs Index (`document-your-python-project-with-mkdocs/source_code_step_5/docs/index.md`)
Calculator Docs
This site contains the project documentation for thecalculator project that is a toy module used in the
Real Python tutorial
Build Your Python Project Documentation With MkDocs.
Its aim is to give you a framework to build your
project documentation using Python, MkDocs,
mkdocstrings, and the Material for MkDocs theme.
Table Of Contents
The documentation follows the best practice for
project documentation as described by Daniele Procida
in the DiΓ‘taxis documentation framework
and consists of four separate parts:
Quickly find what you're looking for depending on
your use case by looking at the different pages.
Project Overview
::: calculator.init
Acknowledgements
I want to thank my house plants for providing me with
a negligible amount of oxygen each day. Also, I want
to thank the sun for providing more than half of their
nourishment free of charge.
Document Your Python Project With Mkdocs Source Code Step 6 Docs Index (`document-your-python-project-with-mkdocs/source_code_step_6/docs/index.md`)
Calculator Docs
This site contains the project documentation for thecalculator project that is a toy module used in the
Real Python tutorial
Build Your Python Project Documentation With MkDocs.
Its aim is to give you a framework to build your
project documentation using Python, MkDocs,
mkdocstrings, and the Material for MkDocs theme.
Table Of Contents
The documentation follows the best practice for
project documentation as described by Daniele Procida
in the DiΓ‘taxis documentation framework
and consists of four separate parts:
Quickly find what you're looking for depending on
your use case by looking at the different pages.
Project Overview
::: calculator.init
Acknowledgements
I want to thank my house plants for providing me with
a negligible amount of oxygen each day. Also, I want
to thank the sun for providing more than half of their
nourishment free of charge.
Document Your Python Project With Mkdocs Source Code Final Docs Explanation (`document-your-python-project-with-mkdocs/source_code_final/docs/explanation.md`)
Explanation
This part of the project documentation focuses on an
understanding-oriented approach. You'll get a
chance to read about the background of the project,
as well as reasoning about how it was implemented.
Note: Expand this section by considering the
following points:
- Give context and background on your library
- Explain why you created it
- Provide multiple examples and approaches of how
to work with it - Help the reader make connections
- Avoid writing instructions or technical descriptions
here
Document Your Python Project With Mkdocs Source Code Final Docs How To Guides (`document-your-python-project-with-mkdocs/source_code_final/docs/how-to-guides.md`)
How-To Guides
This part of the project documentation focuses on a
problem-oriented approach. You'll tackle common
tasks that you might have, with the help of the code
provided in this project.
How To Add Two Numbers?
You have two numbers and you need to add them together.
You're in luck! The calculator package can help you
get this done.
Download the code from this GitHub repository and place
the calculator/ folder in the same directory as your
Python script:
your_project/
β
βββ calculator/
β βββ __init__.py
β βββ calculations.py
β
βββ your_script.pyInside of your_script.py you can now import theadd() function from the calculator.calculations
module:
# your_script.py
from calculator.calculations import addAfter you've imported the function, you can use it
to add any two numbers that you need to add:
# your_script.py
from calculator.calculations import add
print(add(20, 22)) # OUTPUT: 42.0You're now able to add any two numbers, and you'll
always get a float as a result.
Document Your Python Project With Mkdocs Source Code Final Docs Reference (`document-your-python-project-with-mkdocs/source_code_final/docs/reference.md`)
Reference
This part of the project documentation focuses on
an information-oriented approach. Use it as a
reference for the technical implementation of thecalculator project code.
::: calculator.calculations
Document Your Python Project With Mkdocs Source Code Final Docs Tutorials (`document-your-python-project-with-mkdocs/source_code_final/docs/tutorials.md`)
Tutorials
This part of the project documentation focuses on a
learning-oriented approach. You'll learn how to
get started with the code in this project.
Note: Expand this section by considering the
following points:
- Help newcomers with getting started
- Teach readers about your library by making them
write code - Inspire confidence through examples that work for
everyone, repeatably - Give readers an immediate sense of achievement
- Show concrete examples, no abstractions
- Provide the minimum necessary explanation
- Avoid any distractions
Document Your Python Project With Mkdocs Source Code Step 4 Docs Explanation (`document-your-python-project-with-mkdocs/source_code_step_4/docs/explanation.md`)
Explanation
This part of the project documentation focuses on an
understanding-oriented approach. You'll get a
chance to read about the background of the project,
as well as reasoning about how it was implemented.
Note: Expand this section by considering the
following points:
- Give context and background on your library
- Explain why you created it
- Provide multiple examples and approaches of how
to work with it - Help the reader make connections
- Avoid writing instructions or technical descriptions
here
Document Your Python Project With Mkdocs Source Code Step 4 Docs How To Guides (`document-your-python-project-with-mkdocs/source_code_step_4/docs/how-to-guides.md`)
How-To Guides
This part of the project documentation focuses on a
problem-oriented approach. You'll tackle common
tasks that you might have, with the help of the code
provided in this project.
How To Add Two Numbers?
You have two numbers and you need to add them together.
You're in luck! The calculator package can help you
get this done.
Download the code from this GitHub repository and place
the calculator/ folder in the same directory as your
Python script:
your_project/
β
βββ calculator/
β βββ __init__.py
β βββ calculations.py
β
βββ your_script.pyInside of your_script.py you can now import theadd() function from the calculator.calculations
module:
# your_script.py
from calculator.calculations import addAfter you've imported the function, you can use it
to add any two numbers that you need to add:
# your_script.py
from calculator.calculations import add
print(add(20, 22)) # OUTPUT: 42.0You're now able to add any two numbers, and you'll
always get a float as a result.
Document Your Python Project With Mkdocs Source Code Step 4 Docs Reference (`document-your-python-project-with-mkdocs/source_code_step_4/docs/reference.md`)
Reference
This part of the project documentation focuses on
an information-oriented approach. Use it as a
reference for the technical implementation of thecalculator project code.
::: calculator.calculations
Document Your Python Project With Mkdocs Source Code Step 4 Docs Tutorials (`document-your-python-project-with-mkdocs/source_code_step_4/docs/tutorials.md`)
Tutorials
This part of the project documentation focuses on a
learning-oriented approach. You'll learn how to
get started with the code in this project.
Note: Expand this section by considering the
following points:
- Help newcomers with getting started
- Teach readers about your library by making them
write code - Inspire confidence through examples that work for
everyone, repeatably - Give readers an immediate sense of achievement
- Show concrete examples, no abstractions
- Provide the minimum necessary explanation
- Avoid any distractions
Document Your Python Project With Mkdocs Source Code Step 5 Docs Explanation (`document-your-python-project-with-mkdocs/source_code_step_5/docs/explanation.md`)
Explanation
This part of the project documentation focuses on an
understanding-oriented approach. You'll get a
chance to read about the background of the project,
as well as reasoning about how it was implemented.
Note: Expand this section by considering the
following points:
- Give context and background on your library
- Explain why you created it
- Provide multiple examples and approaches of how
to work with it - Help the reader make connections
- Avoid writing instructions or technical descriptions
here
Document Your Python Project With Mkdocs Source Code Step 5 Docs How To Guides (`document-your-python-project-with-mkdocs/source_code_step_5/docs/how-to-guides.md`)
How-To Guides
This part of the project documentation focuses on a
problem-oriented approach. You'll tackle common
tasks that you might have, with the help of the code
provided in this project.
How To Add Two Numbers?
You have two numbers and you need to add them together.
You're in luck! The calculator package can help you
get this done.
Download the code from this GitHub repository and place
the calculator/ folder in the same directory as your
Python script:
your_project/
β
βββ calculator/
β βββ __init__.py
β βββ calculations.py
β
βββ your_script.pyInside of your_script.py you can now import theadd() function from the calculator.calculations
module:
# your_script.py
from calculator.calculations import addAfter you've imported the function, you can use it
to add any two numbers that you need to add:
# your_script.py
from calculator.calculations import add
print(add(20, 22)) # OUTPUT: 42.0You're now able to add any two numbers, and you'll
always get a float as a result.
Document Your Python Project With Mkdocs Source Code Step 5 Docs Reference (`document-your-python-project-with-mkdocs/source_code_step_5/docs/reference.md`)
Reference
This part of the project documentation focuses on
an information-oriented approach. Use it as a
reference for the technical implementation of thecalculator project code.
::: calculator.calculations
Document Your Python Project With Mkdocs Source Code Step 5 Docs Tutorials (`document-your-python-project-with-mkdocs/source_code_step_5/docs/tutorials.md`)
Tutorials
This part of the project documentation focuses on a
learning-oriented approach. You'll learn how to
get started with the code in this project.
Note: Expand this section by considering the
following points:
- Help newcomers with getting started
- Teach readers about your library by making them
write code - Inspire confidence through examples that work for
everyone, repeatably - Give readers an immediate sense of achievement
- Show concrete examples, no abstractions
- Provide the minimum necessary explanation
- Avoid any distractions
Document Your Python Project With Mkdocs Source Code Step 6 Docs Explanation (`document-your-python-project-with-mkdocs/source_code_step_6/docs/explanation.md`)
Explanation
This part of the project documentation focuses on an
understanding-oriented approach. You'll get a
chance to read about the background of the project,
as well as reasoning about how it was implemented.
Note: Expand this section by considering the
following points:
- Give context and background on your library
- Explain why you created it
- Provide multiple examples and approaches of how
to work with it - Help the reader make connections
- Avoid writing instructions or technical descriptions
here
Document Your Python Project With Mkdocs Source Code Step 6 Docs How To Guides (`document-your-python-project-with-mkdocs/source_code_step_6/docs/how-to-guides.md`)
How-To Guides
This part of the project documentation focuses on a
problem-oriented approach. You'll tackle common
tasks that you might have, with the help of the code
provided in this project.
How To Add Two Numbers?
You have two numbers and you need to add them together.
You're in luck! The calculator package can help you
get this done.
Download the code from this GitHub repository and place
the calculator/ folder in the same directory as your
Python script:
your_project/
β
βββ calculator/
β βββ __init__.py
β βββ calculations.py
β
βββ your_script.pyInside of your_script.py you can now import theadd() function from the calculator.calculations
module:
# your_script.py
from calculator.calculations import addAfter you've imported the function, you can use it
to add any two numbers that you need to add:
# your_script.py
from calculator.calculations import add
print(add(20, 22)) # OUTPUT: 42.0You're now able to add any two numbers, and you'll
always get a float as a result.
Document Your Python Project With Mkdocs Source Code Step 6 Docs Reference (`document-your-python-project-with-mkdocs/source_code_step_6/docs/reference.md`)
Reference
This part of the project documentation focuses on
an information-oriented approach. Use it as a
reference for the technical implementation of thecalculator project code.
::: calculator.calculations
Document Your Python Project With Mkdocs Source Code Step 6 Docs Tutorials (`document-your-python-project-with-mkdocs/source_code_step_6/docs/tutorials.md`)
Tutorials
This part of the project documentation focuses on a
learning-oriented approach. You'll learn how to
get started with the code in this project.
Note: Expand this section by considering the
following points:
- Help newcomers with getting started
- Teach readers about your library by making them
write code - Inspire confidence through examples that work for
everyone, repeatably - Give readers an immediate sense of achievement
- Show concrete examples, no abstractions
- Provide the minimum necessary explanation
- Avoid any distractions
--- METRICS ---
- Files Extracted: 21
- Estimated Token Budget: ~4841 tokens
- Canonical Reference: https://codewiki.google/github.com/realpython/materials