edx-rest-api-client
Client utilities to access various Open edX Platform REST APIs.
What it is and what it does
edx-rest-api-client is a wrapper around the requests library that handles OAuth2 authentication and JWT token management for communicating with Open edX platform services. It provides the OAuthAPIClient class, which behaves like a requests.Session but automatically manages token retrieval and caching, reducing boilerplate in services that need to call other Open edX APIs.
The package is built for the Open edX ecosystem and depends on edx-django-utils for its TieredCache caching layer. It requires Django caching and middleware to be configured. You instantiate a client with an LMS root URL, client ID, and secret, then use it like any requests session—the library handles token refresh transparently. Timeout configuration is supported both at client creation and per-request.
Use it for:
- Build an Open edX microservice that needs to call the LMS or other platform APIs with OAuth2 authentication.
- Integrate a third-party tool with Open edX by handling token management and REST calls automatically.
- Develop a Django app within the Open edX platform that communicates with other platform services.
- Cache and reuse OAuth2 tokens across multiple API requests to reduce token endpoint load.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides OAuth2 and JWT utilities for communicating with Open edX services via REST APIs, wrapping the requests library with token management and caching.
Yes, if you are building within or integrating with the Open edX platform and need OAuth2-authenticated REST calls. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. Not relevant for non-Open edX projects.
Install
edx-rest-api-client on PyPI
pip
pip install edx-rest-api-clientuv
uv add edx-rest-api-clientpoetry
poetry add edx-rest-api-clientInstalling edx-rest-api-client
Before you install
Low friction installation with three runtime dependencies (PyJWT, edx-django-utils, requests). Actively maintained with a release 128 days ago and continuous repository activity.
License in practice
Licensed under Apache (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Quickstart
from edx_rest_api_client.client import OAuthAPIClient
client = OAuthAPIClient('https://lms.root', 'client_id', 'client_secret')
response = client.get('https://some.url', timeout=(3.1, 0.5))
Requires Django caching and TieredCache middleware (from edx-django-utils) to be configured in your Django project.
Verify before relying
- Whether the package works outside a Django environment or if Django is a hard requirement.
- Current test coverage and stability guarantees for production use beyond the 'Production/Stable' classifier.
Package facts
| License | Apache (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — PyJWT, edx-django-utils, requests |
| Maintenance | actively maintained — 128 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,528/month — #14,158 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: edx_rest_api_client-7.0.0-py3-none-any.whl
Keywords: edx, rest, api, client
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
edx-drf-extensionsProvides JWT authentication, CSRF token…
permissive · top 15,000 on PyPI
openedx-eventsProvides event definitions and tooling for the…
permissive · top 15,000 on PyPI
requests-oauthlibAdds OAuth 1 and OAuth 2 authentication support…
permissive · top 1,000 on PyPI
ovhLightweight Python wrapper for OVHcloud APIs…
permissive · top 15,000 on PyPI
python-alfresco-apiA Python client library for Alfresco Content…
permissive · top 15,000 on PyPI
edx-django-utilsProvides a collection of shared utilities for…
permissive · top 15,000 on PyPI
pyxeroPyXero is a Python client library for the Xero…
permissive · top 15,000 on PyPI
requests-oauth2clientAn OAuth 2.x client for Python that obtains,…
permissive · top 5,000 on PyPI
python-upwork-oauth2Python bindings for the Upwork API using OAuth…
permissive · top 15,000 on PyPI
enirisEniris is a Python driver for the Eniris API…
permissive · top 15,000 on PyPI