skillfed

edx-rest-api-client

Client utilities to access various Open edX Platform REST APIs.

edx-rest-api-client v7.0.0 82.5K downloads/30d#14,158 on PyPI23
Permissive license Apache Active released

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-client

uv

uv add edx-rest-api-client

poetry

poetry add edx-rest-api-client

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.12Topic :: Internet

Tags

edx rest api clientoauth2 client for edxopen edx api accessjwt authentication edxedx service communicationoauth2 token managementedx platform integration
edx-platformoauth2rest-client

More Internet packages