This is a library for making requests to a Canvas LMS API.
Project description
Canvas LMS API Client Library
=============================
version number: 0.2.0
author: Luc Cary
Overview
--------
This is a library for making requests to a Canvas LMS API.
Canvas LMS API documentation:
https://canvas.instructure.com/doc/api/index.html
This project was originally created with the following "cookiecutter" tool:
https://github.com/wdm0006/cookiecutter-pipproject
Installation / Usage
--------------------
To install use pip:
$ pip install canvas_api_client
Or clone the repo:
$ git clone https://github.com/lcary/canvas_api_client.git
$ python setup.py install
Contributing
------------
This project is tested with python3, and additionally has mypy integration.
Building the wheel:
pip install -r requirements.txt
python setup.py bdist_wheel
How to install the client for testing:
pip uninstall canvas_api_client || echo "Already uninstalled."
pip install --no-index --find-links=dist canvas_api_client
Publishing to pypi (requires `twine` to be installed):
twine upload dist/canvas_api_client-<version>-py2.py3-none-any.whl
Creating the docs:
cd docs
pip install -r requirements.txt
make html
open build/html/index.html
Example
-------
Once installed in your project via pip, use as follows:
```python
import os
from canvas_api_client.v1_client import CanvasAPIv1
url = os.environ.get('CANVAS_API_URL')
token = os.environ.get('CANVAS_API_TOKEN')
api = CanvasAPIv1(url, token)
course_id = '<sis_course_id>'
params = {
"per_page": "100",
"include[]": "enrollments",
"include_inactive": "true""}
course_users = []
for user_data_list in api.get_course_users(course_id, params=params):
course_users.extend(user_data_list)
```
=============================
version number: 0.2.0
author: Luc Cary
Overview
--------
This is a library for making requests to a Canvas LMS API.
Canvas LMS API documentation:
https://canvas.instructure.com/doc/api/index.html
This project was originally created with the following "cookiecutter" tool:
https://github.com/wdm0006/cookiecutter-pipproject
Installation / Usage
--------------------
To install use pip:
$ pip install canvas_api_client
Or clone the repo:
$ git clone https://github.com/lcary/canvas_api_client.git
$ python setup.py install
Contributing
------------
This project is tested with python3, and additionally has mypy integration.
Building the wheel:
pip install -r requirements.txt
python setup.py bdist_wheel
How to install the client for testing:
pip uninstall canvas_api_client || echo "Already uninstalled."
pip install --no-index --find-links=dist canvas_api_client
Publishing to pypi (requires `twine` to be installed):
twine upload dist/canvas_api_client-<version>-py2.py3-none-any.whl
Creating the docs:
cd docs
pip install -r requirements.txt
make html
open build/html/index.html
Example
-------
Once installed in your project via pip, use as follows:
```python
import os
from canvas_api_client.v1_client import CanvasAPIv1
url = os.environ.get('CANVAS_API_URL')
token = os.environ.get('CANVAS_API_TOKEN')
api = CanvasAPIv1(url, token)
course_id = '<sis_course_id>'
params = {
"per_page": "100",
"include[]": "enrollments",
"include_inactive": "true""}
course_users = []
for user_data_list in api.get_course_users(course_id, params=params):
course_users.extend(user_data_list)
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for canvas_api_client-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b8861789b91f3772481f2a0345e624cb6936b08798bdffc42f9b83d4b2f623b |
|
MD5 | 714d8d449f3a0209ea8acdfce1a1e350 |
|
BLAKE2b-256 | 65a7ad11d73036fb027ed298e488d80f46eec0ba9f94722fc6be04de96658300 |