Skip to content

Commit de920f5

Browse files
Add prerequisites and instructions
1 parent 80c362a commit de920f5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ These instructions will get you a copy of the project up and running on your loc
77

88
### Prerequisites
99

10-
{ToDo}
10+
1. **Install [Python 3.7 or greater](https://www.python.org/downloads/)**.
11+
2. **Install [Git](https://git-scm.com/downloads)**.
1112

1213
### Installation and execution
1314

14-
{ToDo}
15+
1. Clone this repo. `git clone https://github.com/ubccapico/getting-started-with-the-canvas-api-with-python.git`
16+
1. Then cd into the repo. `cd getting-started-with-the-canvas-api-with-python`
17+
1. Run the installation script. `pip install -r requirements.txt` (If you see `bash: pip: command not found`, try using `pip3 install -r requirements.txt`)
18+
1. Generate Canvas API token and copy it to clipboard.
19+
1. Rename the `sample.env` file to `.env`, and add your API token to `CANVAS_API_TOKEN={ADD TOKEN HERE}`.
20+
1. Run the script. `python main.py` (If you see `bash: python: command not found`, try using `python3 main.py`). This should log your Canvas info.
1521

1622
### What to do from here
1723

18-
Write your own code and run it! Be mindful that the API is running on the production Canvas instance - if you want to run against the Beta or Test instance, change the URL in `.env` to `https://ubc.test.instructure.com/api/v1` or `http://ubc.beta.instructure.com/api/v1` and regenerate your token(s) from the Beta/Test site.
24+
Write your own code and run it! Be mindful that the API is running on the production Canvas instance - if you want to run against the Beta or Test instance, change the URL in `main.py` to `https://ubc.test.instructure.com` or `http://ubc.beta.instructure.com` and regenerate your token(s) from the Beta/Test site.
1925

2026
## Authors
2127

sample.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CANVAS_API_TOKEN=

0 commit comments

Comments
 (0)