This repo includes exercises to accompany Skiller Whale sessions on the advanced core features of Python 3.
During each session you'll be asked to write and edit code in some of the files.
-
Make sure your Python version is
>= 3.10
. You can check the version you have installed by running:python3 --version
-
Clone this repository onto your computer. You can do this in a terminal by using:
git clone https://github.com/skiller-whale/advanced-core-python.git
-
In a terminal, navigate to the
advanced-core-python
directory you cloned. -
Make sure you have the
requests
package installed in a Python 3 environment. You can do that by running these two commands:python3 -m ensurepip python3 -m pip install requests
-
To check this is all set up, run
python3 sync.py
and enter your attendance ID when prompted. You shouldn't see any errors. -
At the end of the session termimnate the sync script with
Ctrl + C
.
-
Clone this repository onto your computer. You can do this in a terminal by using:
git clone https://github.com/skiller-whale/advanced-core-python.git
-
Open the repository directory in a code editor, and replace the contents of the
attendance_id
file, so that it contains only your unique attendance ID for the session (and nothing else). -
In a terminal, navigate to the
advanced-core-python
directory you cloned. -
Run the following two commands to start the sync script:
docker compose up --build -d docker compose run exercises
The very first time you run this it might take a while to download and build some docker images, but the future times you run it should be quicker.
Python is installed inside the Docker container you downloaded, so you won't need to separately install it, and running the exercises won't affect any other local Python installations.
The
docker compose up
process will continue running in the background, and watch for any file changes in the repo. -
At the end of the session, exit the
exercises
container (e.g. by runningexit
), then run the following to shutdown the sync container:docker compose down