kepler.api.event module

The module defines the Event class used for composing standard format calendar events to be returned by the Kepler REST API.

class kepler.api.event.Event(event_type, title, start_time, end_time)

Bases: object

The class defines the general calendar event object that is returned by the Kepler REST API.

Initializes the event with event type and other mandatory parameters.

Parameters:
  • event_type – The event type (see :py:class:EventType class).
  • title – The title of the event.
  • start_time – The start time of event the as datetime.
  • end_time – The end time of event the as datetime.
to_json_obj()

The function returns the event as JSON serializable dictionary.

class kepler.api.event.EventType

Bases: enum.IntEnum

The enumeration of the calendar event types is returned by the Kepler API. See Event class for more information.

The available event types are the following ones:

External:is an event from an external source.
Reservation:is a reservation event.
Time_slot:is a reservable time slot.
Supervisor_time_slot:
 is a time slot supervised by the current user.