# Rookout tutorial for debugging Python applications
[](https://circleci.com/gh/Rookout/python/tree/master)
[![License][license-image]][license-url]
[![Docs][docs-image]][docs-url]
[![GitHub version][version-badge]](https://badge.fury.io/gh/rookout%2Ftutorial-python)
A sample app for debugging Python using [Rookout][rookout-getting-started].
## Helpful links:
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Usage](#usage)
- [License](#license)
- [Sign up to Rookout][rookout-signup]
- [Online Documentation][docs-url]
## Prerequisites
1. Python 2.7.14 or newer
2. pip
3. Optional - Docker - https://www.docker.com/get-docker
## Setup
3. Clone the sample app from this repository:
```bash
git clone https://github.com/Rookout/tutorial-python.git
cd tutorial-python
```
4. Set your Rookout token as an environment variable (for Windows, use ***set*** instead of **export**)
```bash
export ROOKOUT_TOKEN=[Your Rookout Token]
```
5. Run the app:
```bash
pip install -r requirements.txt
python app.py
```
- Optional - Run the app using Docker:
```bash
docker run -p 5000:5000 -e ROOKOUT_TOKEN=$ROOKOUT_TOKEN rookout/tutorial-python
```
## Usage
- Log in to [the Rookout IDE][rookout-app-url].
- Add the source code according to the instructions using the left pane **Source View**
#### Adding source code
1. Click on Add source
1. Choose source control
- Github
- Click on Connect
- Authorize O-Auth
- Fill `Repository Owner`
- Click `Repository` and choose from the dropdown menu
- Click Next
- Choose the desired branch
- Click View Repository
- Local FileSystem - Server
- Click on Setup Server
- Choose a supported HTTP Server
- Follow the on-screen instructions
More details