/python-d2lvalence_util

Brightspace/Desire2Learn's Python "D2LValence_Util" package.

Primary LanguagePythonOtherNOASSERTION

Desire2Learn Utility Library for Python

This utility library divides functionality into a pair of modules:

Data. The :pyd2lvalence-util.data module provides classes to encapsulate the JSON data structures passed back and forth through the Valence APIs. All the classes inherit from a :pyD2LStructure generic base class <d2lvalence.data.D2LStructure>.

Note that currently we drive additions to the data module by the needs of our samples and ongoing testing: it does not cover all the structures present in the Valence API.

Service. The :pyd2lvalence-util.service module contains a suite of helper functions you can use to make Valence API calls and partially digest the data results passed back. In general, the data passed back by a service function is either a pre-defined class inheriting from :pyD2LStructure <d2lvalence.data.D2LStructure>, or one or more dictionaries formed from the retrieved JSON data.

You can find the latest build of the utils library on our repository download page.

Dependencies. In order to use the Python client utils package, you'll need to first ensure you have a working Python development environment:

  • Python 3 (the reference environment uses Python 3.3).
  • The D2LValence client SDK.
  • The Requests Python package gets used in our :pyservice <d2lvalence-util.service> module to make the calls through to the back-end service, and in our :pyauth <d2lvalence.auth> module so that you can use a calling user context object as an authentication helper for Requests.
  • The Bottle Python package if you want to use the samples available in conjunction with this client library (not a dependency for the client library itself).