{"id":20037835,"url":"https://github.com/openedx/edx-rest-api-client","last_synced_at":"2025-08-19T22:32:24.391Z","repository":{"id":31248627,"uuid":"34810125","full_name":"openedx/edx-rest-api-client","owner":"openedx","description":"Facilitates interaction with edX REST APIs","archived":false,"fork":false,"pushed_at":"2024-04-23T05:02:21.000Z","size":408,"stargazers_count":19,"open_issues_count":8,"forks_count":14,"subscribers_count":115,"default_branch":"master","last_synced_at":"2024-04-23T09:01:09.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openedx.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-29T18:11:55.000Z","updated_at":"2024-04-30T06:51:46.126Z","dependencies_parsed_at":"2024-01-23T08:27:29.300Z","dependency_job_id":"be66403f-44f4-41a9-94a6-94c520222e1c","html_url":"https://github.com/openedx/edx-rest-api-client","commit_stats":{"total_commits":253,"total_committers":31,"mean_commits":8.161290322580646,"dds":"0.43083003952569165","last_synced_commit":"8eb8837c2d5e94ef2cc809124ed371ef12509f50"},"previous_names":["edx/edx-rest-api-client","edx/ecommerce-api-client"],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fedx-rest-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fedx-rest-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fedx-rest-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fedx-rest-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openedx","download_url":"https://codeload.github.com/openedx/edx-rest-api-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230374118,"owners_count":18216041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T10:23:14.684Z","updated_at":"2025-08-19T22:32:24.382Z","avatar_url":"https://github.com/openedx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"edX REST API Client\n###################\n\n| |status-badge| |license-badge| |CI| |Codecov| |pypi-badge|\n\nThe edX REST API Client simplifies communicating with other Open edX services by providing OAuth2 and JWT utilities.\n\n\nGetting Started with Development\n********************************\n\nIn a Python 3.11 virtual environment:\n\n.. code-block:: shell\n\n    $ make requirements\n    $ make validate\n\n\nClients \u0026 REST API Clients code\n*******************************\n\nOpen edX services, including LMS, should use the ``OAuthAPIClient`` class to make OAuth2 client requests and REST API calls.\n\nUsage\n=====\n\nBy default the ``OAuthAPIClient`` object can be used like any `requests.Session`_ object and you can follow the docs that the requests library provides.\n\nThe ``OAuthAPIClient`` sessions makes some extra requests to get access tokens from the auth endpoints.  These requests have a default timeout that can be overridden by passing in a ``timeout`` parameter when instantiating the ``OAuthAPIClient`` object.\n\n.. code-block:: python\n\n    # create client with default timeouts for token retrieval\n    client = OAuthAPIClient('https://lms.root', 'client_id', 'client_secret')\n\n    # create client, overriding default timeouts for token retrieval\n    client = OAuthAPIClient('https://lms.root', 'client_id', 'client_secret', timeout=(6.1, 2))\n    client = OAuthAPIClient('https://lms.root', 'client_id', 'client_secret',\n         timeout=(REQUEST_CONNECT_TIMEOUT, 3)\n    )\n\n    # for a request to some.url, a separate timeout should always be set on your requests\n    client.get('https://some.url', timeout=(3.1, 0.5))\n\nThe value of the ``timeout`` setting is the same as for any request made with the ``requests`` library.  See the `Requests timeouts documentation`_ for more details.\n\n.. _requests.Session: https://requests.readthedocs.io/en/master/user/advanced/#session-objects\n.. _Requests timeouts documentation: https://requests.readthedocs.io/en/master/user/advanced/#timeouts\n\nAdditional Requirements\n***********************\n\nThe OAuthAPIClient uses the TieredCache internally for caching.  Read more about the `requirements of TieredCache`_, which include Django caching and some custom middleware.\n\n.. _requirements of TieredCache: https://github.com/openedx/edx-django-utils/blob/master/edx_django_utils/cache/README.rst#tieredcache\n\nContributing\n************\n\nContributions are very welcome.\nPlease read `How To Contribute \u003chttps://openedx.org/r/how-to-contribute\u003e`_ for details.\n\nThis project is currently accepting all types of contributions, bug fixes,\nsecurity fixes, maintenance work, or new features.  However, please make sure\nto have a discussion about your new feature idea with the maintainers prior to\nbeginning development to maximize the chances of your change being accepted.\nYou can start a conversation by creating a new issue on this repo summarizing\nyour idea.\n\nMore Help\n*********\n\nIf you're having trouble, we have discussion forums at\n`discuss.openedx.org \u003chttps://discuss.openedx.org\u003e`_ where you can connect with others in the\ncommunity.\n\nOur real-time conversations are on Slack. You can request a `Slack\ninvitation`_, then join our `community Slack workspace`_.\n\nFor anything non-trivial, the best path is to `open an issue`__ in this\nrepository with as many details about the issue you are facing as you\ncan provide.\n\n__ https://github.com/openedx/edx-rest-api-client/issues\n\nFor more information about these options, see the `Getting Help`_ page.\n\n.. _Slack invitation: https://openedx.org/slack\n.. _community Slack workspace: https://openedx.slack.com/\n.. _Getting Help: https://openedx.org/getting-help\n\nThe Open edX Code of Conduct\n****************************\n\nAll community members are expected to follow the `Open edX Code of Conduct`_.\n\n.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/\n\nReporting Security Issues\n*************************\n\nPlease do not report security issues in public. Please email security@openedx.org.\n\n\n.. |CI| image:: https://github.com/openedx/edx-rest-api-client/workflows/Python%20CI/badge.svg?branch=master\n    :target: https://github.com/openedx/edx-rest-api-client/actions?query=workflow%3A%22Python+CI%22\n    :alt: Test suite status\n\n.. |Codecov| image:: https://codecov.io/github/openedx/edx-rest-api-client/coverage.svg?branch=master\n    :target: https://codecov.io/github/openedx/edx-rest-api-client?branch=master\n    :alt: Code coverage\n\n.. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen\n    :alt: Maintained\n\n.. |license-badge| image:: https://img.shields.io/github/license/openedx/edx-rest-api-client.svg\n    :target: https://github.com/openedx/edx-rest-api-client/blob/master/LICENSE\n    :alt: License\n\n.. |pypi-badge| image:: https://img.shields.io/pypi/v/edx-rest-api-client.svg\n    :target: https://pypi.python.org/pypi/edx-rest-api-client/\n    :alt: PyPI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenedx%2Fedx-rest-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenedx%2Fedx-rest-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenedx%2Fedx-rest-api-client/lists"}