Built in events

Login and Logout

portal.authentication.signals

Some default events are raised upon logging in and logging out. The login process will first authenticate against the authentication backends, before doing the login proper. These are the signals with the classes that dispatch them:

portal.authentication.views.LoginView

  • portal_pre_authenticate

  • portal_post_authenticate

  • portal_pre_login

  • portal_post_login

portal.authentication.views.LogoutView

  • portal_pre_logout

  • portal_post_logout

These events are passed through with the following attributes:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

args

A list of positional arguments passed.

kwargs

A dictionary of keyword arguments passed.

An example of listening to portal_post_login from within a plugin:

from portal.authentication.signals import portal_post_login

def post_login_handler(instance, **kwargs):
    from portal.authentication.views import LoginView
    if issubclass(kwargs['sender'],LoginView):
        print(instance)
        print(kwargs['sender'])


portal_post_login.connect(post_login_handler)

This will print out the sender (class), instance (the user object) and any other keyword arguments.

If the above example is placed in a file plistner.py this should either be under the main plugin directory or within a directory imported by __init__.py under the plugins directory.

Vidispine Cantemo Interface

The Vidispine Cantemo Interface raises many events with operations on Vidispine objects and items.

Vidispine Events

These are the event senders that are raised for the vidispine system.

vidispine.signals.vidispine_pre_create

Arguments sent with this signal:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

method

The method that was called with the event. There can be for instance multiple modified events.

args

A list of positional arguments passed.

kwargs

A dictionary of keyword arguments passed.

vidispine.signals.vidispine_post_create

Arguments sent with this signal:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

method

The method that was called with the event. There can be for instance multiple modified events.

vidispine.signals.vidispine_pre_modify

Arguments sent with this signal:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

method

The method that was called with the event. There can be for instance multiple modified events.

args

A list of positional arguments passed.

kwargs

A dictionary of keyword arguments passed.

vidispine.signals.vidispine_post_modify

Arguments sent with this signal:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

method

The method that was called with the event. There can be for instance multiple modified events.

vidispine.signals.vidispine_pre_delete

Arguments sent with this signal:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

method

The method that was called with the event. There can be for instance multiple modified events.

args

A list of positional arguments passed.

kwargs

A dictionary of keyword arguments passed.

vidispine.signals.vidispine_post_delete

Arguments sent with this signal:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

method

The method that was called with the event. There can be for instance multiple modified events.

vidispine.signals.vidispine_pre_get

It should be noted that this signal isn’t used currently. Arguments sent with this signal:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

method

The method that was called with the event. There can be for instance multiple modified events.

args

A list of positional arguments passed.

kwargs

A dictionary of keyword arguments passed.

vidispine.signals.vidispine_post_get

It should be noted that this signal isn’t used currently. Arguments sent with this signal:

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

method

The method that was called with the event. There can be for instance multiple modified events.

Vidispine Notification events

These events are raised when we get notifications from Vidispine.

vidispine.signals.vidispine_auto_import_ntfcn

This event is for an asset auto import notification.

sender

The class that just had an instance created.

instance

The actual instance of the model that’s just been created.

Vidispine User events

vidispine.interface.UserHelper

These event methods are raised when Users are modified, created and deleted.

  • createUser

  • deleteUser

  • addUserToGroup

  • removeUserFromGroup

Vidispine Group events

vidispine.interface.GroupHelper

These event methods are raised when Groups are modified, created and deleted.

  • createGroup

  • setChildGroupToGroup

  • removeChildGroupFromGroup

  • removeGroup

Vidispine Item events

vidispine.interface.ItemHelper

These event methods are raised when Items are modified, created and deleted:

* createPlaceholder
* setItemMetadata
* removeMetadataField
* createMetadataFieldGroup
* removeMetadataFieldGroup
* createOrModifyMetadataField
* addFieldToMetadataFieldGroup
* removeItem
* removeShapeTag
* createOrModifyShapeTag
* retranscode