Plugins

Plugins

class heedy.plugins.Plugin(config=None, session='async')[source]

Bases: object

apps

An Apps instance, allowing to interact with the users in Heedy. Listing apps that conform to the given restrictions can be done by calling plugin.apps().

copy(session=None)[source]
fire(event)[source]

Fires the given event

async forward(request, data=None, headers=None, overlay=None)[source]

Forwards the given request to the underlying database. It only functions in async mode.

Returns the response.

hasAccess(request, scope)[source]
isAdmin(request)[source]
isApp(request)[source]
isUser(request)[source]
property name
notifications

A Notifications object that allows you to access to notifications in the Heedy instance. See Notifications for details.

notify(*args, **kwargs)[source]

Shorthand for self.notifications.notify (see Notifications).

objectRequest(request)[source]
objects

An Objects instance, allowing to interact with the objects in Heedy. Listing objects that conform to given restrictions can be done by calling plugin.objects().

query_as(accessor)[source]
async respond_forwarded(request, **kwargs)[source]

Responds to the request with the result of forward()

users

An Users instance, allowing to interact with the users in Heedy. Users can be listed with plugin.objects().