Tools and documentations that we'll use throughout this tutorial.
See also: Python venv tutorial documentation.
It is recommended that you install the Python packages inside a virtual
environment. For this tutorial, we'll use venv
(but feel free to use
any other wrapper you are comfortable with).
Create a new virtual environment using venv:
python3.7 -m venv tutorial-env
Activate the virtual environment. On Unix, Mac OS:
source tutorial-env/bin/activate
On Windows:
tutorial-env\Scripts\activate.bat
Installation:
python3.7 -m pip install octomachinery==|octomachinery_version|
octomachinery source code
Owner: Sviatoslav Sydorenko
- Installation:
pip install gidgethub
. - gidgethub documentation
- gidgethub source code
- Owner: Brett Cannon
We will use some f-strings during this tutorial.
Check out Mariatta's talk about f-strings.
Example:
first_name = "bart"
last_name = "simpson"
# old style %-formatting
print("Hello %s %s" % (first_name, last_name))
# str.format
print("Hello {first_name} {last_name}".format(first_name=first_name, last_name=last_name))
# f-string
print(f"Hello {first_name} {last_name}")
Both octomachinery and gidgethub are both async libraries. Read up the quick intro to asyncio.
Python on Heroku documentation.