Template repository for projects based on the Bb-rest-helper library
Project description
This script was created in Python 3, make sure Python3 is installed and working in your system. Here are the steps to make it work.
- Download or clone the repository.
- Create a virtual environment and activate it.
#env creation
python3 -m venv env
#env activation
source env/bin/activate
- Install dependencies, either from 'requirements.txt' or manually.
#dependencies from requeriments.txt
pip3 -r requeriments.txt
#dependencies manually
pip3 install Bb-rest-helper
pip3 install jupyter
-
In the developer portal, register a new application and retrieve the KEY and SECRET values. Configure this application in Learn with an user with sufficient priviledges to
- list required priviledges
- list required priviledges
- list required priviledges
⚠️ Do NOT use an admin user to register your application!
More information can be found in Anthology´s developer documentation page
- Within root, create a folder called "credentials" inside of that folder, create a file named "learn_config.json" and fill it with the following template with the KEY and SECRET values. For convenience, such folder and template files are created in this template repository.
{
"url":"Learn Server url",
"key":"KEY from dev portal",
"secret":"SECRET from dev portal"
}
Once setup is complete, the script can be run from a terminal.
- Open a terminal and navegate to the root directory
- Run the script with Python3
Python3 app.py