--- id: edx-rest-api-client version: "7.0.0" license: Apache license_treatment: permissive maintenance: active --- # edx-rest-api-client — Client utilities to access various Open edX Platform REST APIs. License: permissive · Maintenance: active · Downloads: 82.5K/mo ## 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 above — 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 pip install edx-rest-api-client uv add edx-rest-api-client 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: unspecified - Install friction: low - Maintenance: active - Downloads: 82.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags edx rest api client, oauth2 client for edx, open edx api access, jwt authentication edx, edx service communication, oauth2 token management, edx platform integration, edx-platform, oauth2, rest-client [View on SkillFed](https://skillfed.io/packages/edx-rest-api-client) · [View on PyPI](https://pypi.org/project/edx-rest-api-client/)