Skip to content

edx/edx-filters-pipelines

edx-filters-pipelines

Supported Python versions License status-badge

Purpose

edx-filters-pipelines is a private Python package for edx.org that extends openedx-filters by adding custom pipelines specific to edx.org.

These pipelines enforce edx.org–specific business rules and behaviors across platform events such as registration, authentication, and course access.

Features

  1. Provides edx.org–specific filter pipelines that plug into the Open edX system.
  2. Implements custom validation and enforcement logic (e.g., username restrictions).
  3. Fully compatible with the OPEN_EDX_FILTERS_CONFIG setting in edx-platform.

Getting Started with Development

Please see the Open edX documentation for guidance on Python development in this repo.

Deploying

Since this is a private repo, installation is handled via GitHub with an access token:

pip install git+https://<your-token>@github.com/edx/edx-filters-pipelines.git@<tag>#egg=edx-filters-pipelines

Make sure deployment agents have access to this private repo before installing.

(TODO: How to add private requirements to edx-platform documentation)

Getting Help

Documentation

Configuration

To use the pipelines, configure them in your edx-platform settings via OPEN_EDX_FILTERS_CONFIG:

OPEN_EDX_FILTERS_CONFIG = {
    "org.openedx.filter.type.v1": {
        "pipeline": [
            "path.to.pipeline.CustomPipeline"
        ],
        "fail_silently": False,
    }
}
  • filter_type → The event name defined by an OpenEdxPublicFilter (e.g., "org.openedx.learning.student.registration.requested.v1").
  • pipeline → Full Python import path to your PipelineStep class.
  • fail_silently → If True, errors are ignored; if False, exceptions are raised.

Concepts

  • OpenEdxPublicFilter → Declares a filter hook (event). Defines the event name, data context, and any exceptions.
  • PipelineStep → Implements the logic that runs when the filter is triggered.
  • OPEN_EDX_FILTERS_CONFIG → Wires filters to pipeline implementations.

Example

Below are generic examples showing how to define and use Filters and Pipeline Steps with edx-filters-pipelines. Below are generic examples showing how to define and use Filters and Pipeline Steps with edx-filters-pipelines.

Filter Example

from openedx_filters.tooling import OpenEdxPublicFilter

class CustomFilter(OpenEdxPublicFilter):
    """
    Example filter used to modify the process in the LMS.

    Filter Type:
        org.openedx.filter.type.v1

    Trigger:
        - Repository: openedx/edx-platform
        - Path: path/to/function/
        - Method: View.post
    """

    filter_type = "org.openedx.filter.type.v1"

Pipeline Example

from edx_filters_pipelines.pipelines.base import PipelineStep

class CustomPipeline(PipelineStep):
    """
    Pipeline that adds functionality to filter type
    """
    def run_filter(self, data, **kwargs):
        return data

More Help

If you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.

Our real-time conversations are on Slack. You can request a Slack invitation, then join our community Slack workspace.

For anything non-trivial, the best path is to open an issue in this repository with as many details about the issue you are facing as you can provide.

https://github.com/edx/edx-filters-pipelines/issues

For more information about these options, see the Getting Help page.

License

The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.

Please see LICENSE.txt for details.

Contributing

Contributions are very welcome. Please read How To Contribute for details.

This project is currently accepting all types of contributions, bug fixes, security fixes, maintenance work, or new features. However, please make sure to discuss your new feature idea with the maintainers before beginning development to maximize the chances of your change being accepted. You can start a conversation by creating a new issue on this repo summarizing your idea.

The Open edX Code of Conduct

All community members are expected to follow the Open edX Code of Conduct.

People

The assigned maintainers for this component and other project details may be found in Backstage. Backstage pulls this data from the catalog-info.yaml file in this repo.

Reporting Security Issues

Please do not report security issues in public. Please email [email protected].

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •