openedx.core.djangoapps.video_pipeline package#
Subpackages#
Submodules#
openedx.core.djangoapps.video_pipeline.api module#
API utils in order to communicate to edx-video-pipeline.
- openedx.core.djangoapps.video_pipeline.api.send_transcript_credentials(pipeline_integration, credentials_payload)#
Sends transcript credentials to video pipeline
- openedx.core.djangoapps.video_pipeline.api.update_3rd_party_transcription_service_credentials(**credentials_payload)#
Updates the 3rd party transcription service’s credentials. Credentials are updated for all the enabled pipelines.
- Parameters:
credentials_payload (dict) – A payload containing org, provider and its credentials.
- Returns:
A Boolean specifying whether the credentials were updated or not and an error response received from pipeline.
Note: If one of the pipeline fails to update the credentials, False is returned, meaning that credentials were not updated and both calls should be tried again.
openedx.core.djangoapps.video_pipeline.forms module#
Defines a form to provide validations for course-specific configuration.
- class openedx.core.djangoapps.video_pipeline.forms.CourseVideoUploadsEnabledByDefaultAdminForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)#
Bases:
CourseSpecificFlagAdminBaseFormForm for course-specific Video Uploads enabled by default configuration.
- class Meta#
Bases:
object- fields = '__all__'#
- model#
alias of
CourseVideoUploadsEnabledByDefault
- base_fields = {'course_id': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
- class openedx.core.djangoapps.video_pipeline.forms.VEMPipelineIntegrationAdminForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)#
Bases:
ModelFormForm for VEM Pipeline Integration Admin class.
- class Meta#
Bases:
object- fields = '__all__'#
- model#
alias of
VEMPipelineIntegration
- base_fields = {'api_url': <django.forms.fields.URLField object>, 'client_name': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>, 'service_username': <django.forms.fields.CharField object>}#
- declared_fields = {}#
- property media#
Return all media required to render the widgets on this form.
openedx.core.djangoapps.video_pipeline.models module#
Model to hold edx-video-pipeline configurations.
- class openedx.core.djangoapps.video_pipeline.models.CourseVideoUploadsEnabledByDefault(*args, **kwargs)#
Bases:
ConfigurationModelEnables video uploads for a specific course.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- KEY_FIELDS = ('course_id',)#
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- change_date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- changed_by#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- changed_by_id#
- course_id#
DO NOT REUSE THIS CLASS. Provided for backwards compatibility only!
A placeholder class that provides a way to set the attribute on the model.
- enabled#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
- get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class openedx.core.djangoapps.video_pipeline.models.VEMPipelineIntegration(*args, **kwargs)#
Bases:
ConfigurationModelManages configuration for connecting to the video encode manager service and using its API.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- api_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- change_date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- changed_by#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- changed_by_id#
- client_name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- enabled#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
- get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
- get_service_user()#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- service_username#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class openedx.core.djangoapps.video_pipeline.models.VideoUploadsEnabledByDefault(*args, **kwargs)#
Bases:
ConfigurationModelEnables video uploads across the platform.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- change_date#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- changed_by#
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- changed_by_id#
- enabled#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- enabled_for_all_courses#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- classmethod feature_enabled(course_id)#
Looks at the currently active configuration model to determine whether the VideoUploadsEnabledByDefault feature is available.
If the feature flag is not enabled, the feature is not available. If the flag is enabled for all the courses, feature is available. If the flag is enabled and the provided course_id is for a course
with CourseVideoUploadsEnabledByDefault enabled, then the feature is available.
- Parameters:
course_id (CourseKey) – course id for whom feature will be checked.
- get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
- get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
openedx.core.djangoapps.video_pipeline.utils module#
Utils for video_pipeline app.
- openedx.core.djangoapps.video_pipeline.utils.create_video_pipeline_api_client(api_client_id, api_client_secret)#
Returns an API client which can be used to make Video Pipeline API requests.
- Parameters:
api_client_id (unicode) – Video pipeline client id.
api_client_secret (unicode) – Video pipeline client secret.