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.
- Provides edx.org–specific filter pipelines that plug into the Open edX system.
- Implements custom validation and enforcement logic (e.g., username restrictions).
- Fully compatible with the
OPEN_EDX_FILTERS_CONFIG
setting inedx-platform
.
Please see the Open edX documentation for guidance on Python development in this repo.
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)
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; ifFalse
, exceptions are raised.
- 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.
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
.
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"
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
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.
The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.
Please see LICENSE.txt for details.
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.
All community members are expected to follow the Open edX Code of Conduct.
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.
Please do not report security issues in public. Please email [email protected].