{"id":21258363,"url":"https://github.com/ubc/getting-started-with-the-canvas-api-with-python","last_synced_at":"2025-07-11T02:32:32.844Z","repository":{"id":74594229,"uuid":"185680886","full_name":"ubc/getting-started-with-the-canvas-api-with-python","owner":"ubc","description":"Super easy way to get started with the Canvas API using Python","archived":false,"fork":false,"pushed_at":"2024-04-05T00:30:08.000Z","size":20,"stargazers_count":11,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T19:34:12.655Z","etag":null,"topics":["api","canvas","lms","python","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-05-08T21:19:59.000Z","updated_at":"2025-02-04T18:06:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"f373a66e-6796-4217-9bf2-76728bd5f2a2","html_url":"https://github.com/ubc/getting-started-with-the-canvas-api-with-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ubc/getting-started-with-the-canvas-api-with-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fgetting-started-with-the-canvas-api-with-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fgetting-started-with-the-canvas-api-with-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fgetting-started-with-the-canvas-api-with-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fgetting-started-with-the-canvas-api-with-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubc","download_url":"https://codeload.github.com/ubc/getting-started-with-the-canvas-api-with-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fgetting-started-with-the-canvas-api-with-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264712814,"owners_count":23652665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","canvas","lms","python","tutorial"],"created_at":"2024-11-21T04:08:33.033Z","updated_at":"2025-07-11T02:32:32.542Z","avatar_url":"https://github.com/ubc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Getting Started with the Canvas API with Python\n\nThis script will get you started with interfacing with the Canvas API using Python.\n\n## Getting Started\nThese instructions will get you a copy of the script up and running on your local machine for use with Canvas and your own API tokens. This script makes a request to the Canvas API that displays basic information about your user profile.\n\n### Prerequisites\n\n1. **Install [Python 3.7 or greater](https://www.python.org/downloads/)**.\n2. **Install [Git](https://git-scm.com/downloads)**.\n\n### Installation and execution\n\n*Not sure how to clone a repo? Check out this [helpful guide first!](https://codeburst.io/git-and-github-in-a-nutshell-b0a3cc06458f)*\n\n1. Open command prompt on Mac or command line on Windows.\n1. Clone this repo. `git clone https://github.com/ubccapico/getting-started-with-the-canvas-api-with-python.git`\n1. Then cd into the repo. `cd getting-started-with-the-canvas-api-with-python`\n1. Run the installation script. `pip install -r requirements.txt` (If you see `bash: pip: command not found`, try using `pip3 install -r requirements.txt`)\n1. Generate Canvas API token and copy it to clipboard.\n1. Rename the `sample.env` file to `.env`, and add your API token to `CANVAS_API_TOKEN={ADD TOKEN HERE}`.\n1. 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.\n\n### What to do from here\n\nTry running some other scripts from [Capico](https://github.com/ubccapico). \n\nYou can also 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. *Students do not have access to Beta or Test, sorry!*\n\n## Authors\n\n* **Justin Lee**\nhttps://github.com/justin0022 | justin.lee@ubc.ca\n* **Andrew Gardener**\nhttps://github.com/andrew-gardener | andrew.gardener@ubc.ca\n\n## License\n\nThis project is licensed under the GPL 3 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fgetting-started-with-the-canvas-api-with-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubc%2Fgetting-started-with-the-canvas-api-with-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fgetting-started-with-the-canvas-api-with-python/lists"}