Skip to main content

Client library for Apereo OpenLRW API

Project description

# OpenLRW Python API Client


> A Python Client making your scripts for OpenLRW easier

<p align="center">
<a href='https://www.python.org/dev/peps/pep-0008/'><img src="https://img.shields.io/badge/code%20style-pep8-orange.svg" alt="code style pep 8"></a>
<a href="https://badge.fury.io/py/openlrw"><img src="https://badge.fury.io/py/openlrw.svg" alt="PyPI version"></a>
</p>

## Getting Started
` pip install openlrw `

## Usage

#### 1. Interacting with the User collection

```python

from openlrw.client import OpenLRW
from openlrw.exceptions import ExpiredTokenException

OpenLrw = OpenLRW(uri, username, password) # Create an instance of the client
jwt = OpenLrw.generate_jwt() # Generate a JSON Web Token for using OneRoster routes

# 1. Get the user john_doe
try:
user = OpenLrw.get_user('john_doe', jwt)
except ExpiredTokenException:
OpenLRW.pretty_error("Error", "JWT Expired")

# 2. Get all the users
try:
users = OpenLrw.get_users(jwt)
except ExpiredTokenException:
OpenLRW.pretty_error("Error", "JWT Expired")




```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openlrw-1.0.0rc0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

openlrw-1.0.0rc0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file openlrw-1.0.0rc0.tar.gz.

File metadata

  • Download URL: openlrw-1.0.0rc0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for openlrw-1.0.0rc0.tar.gz
Algorithm Hash digest
SHA256 b4f6a81e8d3ca3d765b7bdfd2e99b75d898983b8d0ae1c6dd8fef0c8d6d95246
MD5 c7de4b4424586680d3f209dc24433b7b
BLAKE2b-256 5ad5c9d4d1172f7f1ea5d5867a7b0bda2ca75aba24e7deb5c9edc1b6b37aa63b

See more details on using hashes here.

File details

Details for the file openlrw-1.0.0rc0-py3-none-any.whl.

File metadata

  • Download URL: openlrw-1.0.0rc0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for openlrw-1.0.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe37173b729cd4172e528a70d7ca811c86b7b244a7c20674e3433776c33717cc
MD5 27f06e74ee5a729f8567f66a0a0532ec
BLAKE2b-256 ee048825fc87d33b6cf9616f3e7abb811b8764ff129a77fad0780f81b4db17aa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page