Name | eox-hooks JSON |
Version |
7.0.0
JSON |
| download |
home_page | None |
Summary | EoxHooks |
upload_time | 2024-11-22 14:26:36 |
maintainer | None |
docs_url | None |
author | eduNEXT |
requires_python | None |
license | AGPL |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
=========
EOX Hooks
=========
|Maintainance Badge| |Test Badge| |PyPI Badge|
.. |Maintainance Badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen
:alt: Maintainance Status
.. |Test Badge| image:: https://img.shields.io/github/actions/workflow/status/edunext/eox-hooks/.github%2Fworkflows%2Ftests.yml?label=Test
:alt: GitHub Actions Workflow Test Status
.. |PyPI Badge| image:: https://img.shields.io/pypi/v/eox-hooks?label=PyPI
:alt: PyPI - Version
This plugin extends and customizes the `edx-platform`_ by leveraging Open edX and Django events to trigger specific actions. Key features include:
- **Post to Webhook URL:** Sends data to a specified URL based on the eox-hooks settings.
- **Get Extended Certificate Data:** Adds comprehensive certificate information to the webhook request.
- **Trigger Enrollments Creation:** Initiates an asynchronous task to enroll users in a list of courses.
- **Trigger Grades Assignment:** Propagates grades to a specified course component.
- **Create Enrollments for Program:** Enroll users in a predefined list of courses constituting a Course Program.
Installation
=============
#. Add this plugin in your Tutor ``config.yml`` with the ``OPENEDX_EXTRA_PIP_REQUIREMENTS`` setting.
.. code-block:: yaml
OPENEDX_EXTRA_PIP_REQUIREMENTS:
- eox-hooks=={{version}}
#. Save the configuration with ``tutor config save``.
#. Build the image and launch your platform with ``tutor local launch``.
Usage
======
Before using eox-hooks, you need to set ``USE_EOX_HOOKS`` in ``True`` and configure ``EOX_HOOKS_DEFINITIONS`` in each tenant or site configuration that wants to use the plugin as follows:
.. code-block:: yaml
USE_EOX_HOOKS: True
EOX_HOOKS_DEFINITIONS:
{
"<trigger_event>":
{
"action": "<action_name>",
"config":
{
"url": "https://webhook.site",
},
"fail_silently": False,
"module": "<path_to_module>",
},
}
Where:
- **trigger_event:** The name of the event the platform sends and eox-hooks listen, such as ``post_enrollment``. For a detailed list, visit the `trigger events examples file <docs/trigger_event_examples.rst>`_.
- **action_name:** Specify the name of the action to execute. For example: ``custom_action``. To see the available actions in eox-hooks, visit the `default hook actions file <docs/default_hook_actions.rst>`_.
- **config:** Adds more information to the action.
- **fail_silently:** Defines what happens if an exception arises while executing the action. If ``False``, then the exception is raised.
- **path_to_module:** Path to the module defining the action to execute. For example: ``eox_hooks.actions``.
Example
########
.. code-block:: yaml
EOX_HOOKS_DEFINITIONS:
{
"post_register":
{
"action": "post_to_webhook_url",
"config":
{
"fields": { "recipient_email": "user.pii.email" },
"send_certificate_data": False,
"url": "https://webhook.site",
},
"fail_silently": True,
"module": "eox_hooks.actions",
},
}
For more examples visit, the `hooks settings example file <docs/hooks_example.rst>`_.
Compatibility Notes
====================
+---------------------+----------------+
| Open edX Release | Version |
+=====================+================+
| Juniper | <= 1.0 |
+---------------------+----------------+
| Koa | > 1.0 < 2.0 |
+---------------------+----------------+
| Lilac | > 1.0 < 2.0 |
+---------------------+----------------+
| Maple | >= 2.0 < 3.0 |
+---------------------+----------------+
| Nutmeg | >= 3.0 < 7.0 |
+---------------------+----------------+
| Olive | >= 4.0 < 7.0 |
+---------------------+----------------+
| Palm | >= 5.0 < 7.0 |
+---------------------+----------------+
| Quince | >= 6.0 |
+---------------------+----------------+
| Redwood | >= 6.3.0 |
+---------------------+----------------+
The plugin is configured for the latest release (Quince). The following changes in the plugin settings should be applied to be used for previous releases.
Those settings can be changed in ``eox_hooks/settings/common.py`` or, for example, in the instance configurations.
🚨 If the release you are looking for is not listed, please note:
- If the Open edX release is compatible with the current eox-hooks version (see `Compatibility Notes <https://github.com/eduNEXT/eox-hooks?tab=readme-ov-file#compatibility-notes>`_), the default configuration is sufficient.
- If incompatible, you can refer to the README from the relevant version tag for configuration details (e.g., `v5.1.0 README <https://github.com/eduNEXT/eox-hooks/blob/v5.1.0/README.rst>`_).
How to Contribute
==================
Contributions are welcome! See our `CONTRIBUTING`_ file for more
information – it also contains guidelines for how to maintain high code
quality, which will make your contribution more likely to be accepted.
.. _CONTRIBUTING: https://github.com/eduNEXT/eox-hooks/blob/master/CONTRIBUTING.rst
.. _edx-platform: https://github.com/openedx/edx-platform/
License
=======
This project is licensed under the AGPL-3.0 License. See the `LICENSE <LICENSE.txt>`_ file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "eox-hooks",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "eduNEXT",
"author_email": "contact@edunext.co",
"download_url": "https://files.pythonhosted.org/packages/97/21/ce974fc9c2d0a91246da810398eed32f5978ac9e5ed52fdeb4458b74cdac/eox_hooks-7.0.0.tar.gz",
"platform": null,
"description": "=========\nEOX Hooks\n=========\n\n|Maintainance Badge| |Test Badge| |PyPI Badge|\n\n.. |Maintainance Badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen\n :alt: Maintainance Status\n.. |Test Badge| image:: https://img.shields.io/github/actions/workflow/status/edunext/eox-hooks/.github%2Fworkflows%2Ftests.yml?label=Test\n :alt: GitHub Actions Workflow Test Status\n.. |PyPI Badge| image:: https://img.shields.io/pypi/v/eox-hooks?label=PyPI\n :alt: PyPI - Version\n\nThis plugin extends and customizes the `edx-platform`_ by leveraging Open edX and Django events to trigger specific actions. Key features include:\n\n- **Post to Webhook URL:** Sends data to a specified URL based on the eox-hooks settings.\n- **Get Extended Certificate Data:** Adds comprehensive certificate information to the webhook request.\n- **Trigger Enrollments Creation:** Initiates an asynchronous task to enroll users in a list of courses.\n- **Trigger Grades Assignment:** Propagates grades to a specified course component.\n- **Create Enrollments for Program:** Enroll users in a predefined list of courses constituting a Course Program.\n\n\nInstallation\n=============\n\n#. Add this plugin in your Tutor ``config.yml`` with the ``OPENEDX_EXTRA_PIP_REQUIREMENTS`` setting.\n\n .. code-block:: yaml\n \n OPENEDX_EXTRA_PIP_REQUIREMENTS:\n - eox-hooks=={{version}}\n \n#. Save the configuration with ``tutor config save``.\n#. Build the image and launch your platform with ``tutor local launch``.\n\n\nUsage\n======\n\nBefore using eox-hooks, you need to set ``USE_EOX_HOOKS`` in ``True`` and configure ``EOX_HOOKS_DEFINITIONS`` in each tenant or site configuration that wants to use the plugin as follows:\n\n.. code-block:: yaml\n\n USE_EOX_HOOKS: True\n EOX_HOOKS_DEFINITIONS:\n {\n \"<trigger_event>\":\n {\n \"action\": \"<action_name>\",\n \"config\":\n {\n \"url\": \"https://webhook.site\",\n },\n \"fail_silently\": False,\n \"module\": \"<path_to_module>\",\n },\n }\n\nWhere:\n\n- **trigger_event:** The name of the event the platform sends and eox-hooks listen, such as ``post_enrollment``. For a detailed list, visit the `trigger events examples file <docs/trigger_event_examples.rst>`_.\n- **action_name:** Specify the name of the action to execute. For example: ``custom_action``. To see the available actions in eox-hooks, visit the `default hook actions file <docs/default_hook_actions.rst>`_.\n- **config:** Adds more information to the action.\n- **fail_silently:** Defines what happens if an exception arises while executing the action. If ``False``, then the exception is raised.\n- **path_to_module:** Path to the module defining the action to execute. For example: ``eox_hooks.actions``.\n\nExample\n########\n\n.. code-block:: yaml\n\n EOX_HOOKS_DEFINITIONS:\n {\n \"post_register\":\n {\n \"action\": \"post_to_webhook_url\",\n \"config\":\n {\n \"fields\": { \"recipient_email\": \"user.pii.email\" },\n \"send_certificate_data\": False,\n \"url\": \"https://webhook.site\",\n },\n \"fail_silently\": True,\n \"module\": \"eox_hooks.actions\",\n },\n }\n\nFor more examples visit, the `hooks settings example file <docs/hooks_example.rst>`_.\n\n\nCompatibility Notes\n====================\n\n+---------------------+----------------+\n| Open edX Release | Version |\n+=====================+================+\n| Juniper | <= 1.0 |\n+---------------------+----------------+\n| Koa | > 1.0 < 2.0 |\n+---------------------+----------------+\n| Lilac | > 1.0 < 2.0 |\n+---------------------+----------------+\n| Maple | >= 2.0 < 3.0 |\n+---------------------+----------------+\n| Nutmeg | >= 3.0 < 7.0 |\n+---------------------+----------------+\n| Olive | >= 4.0 < 7.0 |\n+---------------------+----------------+\n| Palm | >= 5.0 < 7.0 |\n+---------------------+----------------+\n| Quince | >= 6.0 |\n+---------------------+----------------+\n| Redwood | >= 6.3.0 |\n+---------------------+----------------+\n\nThe plugin is configured for the latest release (Quince). The following changes in the plugin settings should be applied to be used for previous releases.\nThose settings can be changed in ``eox_hooks/settings/common.py`` or, for example, in the instance configurations.\n\n\n\ud83d\udea8 If the release you are looking for is not listed, please note:\n\n- If the Open edX release is compatible with the current eox-hooks version (see `Compatibility Notes <https://github.com/eduNEXT/eox-hooks?tab=readme-ov-file#compatibility-notes>`_), the default configuration is sufficient.\n- If incompatible, you can refer to the README from the relevant version tag for configuration details (e.g., `v5.1.0 README <https://github.com/eduNEXT/eox-hooks/blob/v5.1.0/README.rst>`_).\n\nHow to Contribute\n==================\n\nContributions are welcome! See our `CONTRIBUTING`_ file for more\ninformation \u2013 it also contains guidelines for how to maintain high code\nquality, which will make your contribution more likely to be accepted.\n\n.. _CONTRIBUTING: https://github.com/eduNEXT/eox-hooks/blob/master/CONTRIBUTING.rst\n.. _edx-platform: https://github.com/openedx/edx-platform/\n\n\nLicense\n=======\n\nThis project is licensed under the AGPL-3.0 License. See the `LICENSE <LICENSE.txt>`_ file for details.\n",
"bugtrack_url": null,
"license": "AGPL",
"summary": "EoxHooks",
"version": "7.0.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "67dce34f719386420951ef3e718ecef24f35424f076caa66e6e3f89c2d62a321",
"md5": "06a5523e83129ec9bf736b1498fa27da",
"sha256": "fcf683148b15863a4c4dfcda0333372c3a5f836885e507761a6b6ac1cbb8099b"
},
"downloads": -1,
"filename": "eox_hooks-7.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "06a5523e83129ec9bf736b1498fa27da",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 47280,
"upload_time": "2024-11-22T14:26:35",
"upload_time_iso_8601": "2024-11-22T14:26:35.098388Z",
"url": "https://files.pythonhosted.org/packages/67/dc/e34f719386420951ef3e718ecef24f35424f076caa66e6e3f89c2d62a321/eox_hooks-7.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9721ce974fc9c2d0a91246da810398eed32f5978ac9e5ed52fdeb4458b74cdac",
"md5": "25bc55105221e1406f4ebb38ca9d6339",
"sha256": "9b1d15e8951029b5411833a934066112f77c171a98f08c5547a4c42b5e592963"
},
"downloads": -1,
"filename": "eox_hooks-7.0.0.tar.gz",
"has_sig": false,
"md5_digest": "25bc55105221e1406f4ebb38ca9d6339",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 38435,
"upload_time": "2024-11-22T14:26:36",
"upload_time_iso_8601": "2024-11-22T14:26:36.731322Z",
"url": "https://files.pythonhosted.org/packages/97/21/ce974fc9c2d0a91246da810398eed32f5978ac9e5ed52fdeb4458b74cdac/eox_hooks-7.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-22 14:26:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "eox-hooks"
}