verkada_py package

Submodules

verkada_py.camera module

Camera class. Organization will have a lot of these class

class verkada_py.camera.Camera(info: dict, api_key: Optional[str] = None, org_id: Optional[str] = None)[source]

Bases: SharedAttributes

Camera class represents a camera in a Verkada Organization.

IP
Returns

str IP of the camera. Likely a private IP

MAC
Returns

str MAC address of the camera

cloud_retention
Returns

int Amount of days of cloud retention

date_added
Returns

int Epoch time when the camera was added to Command

device_retention
Returns

int Amount of days of storage on the camera

firmware
Returns

bool If the firmware is up to date

Get a link to footage for an epoch timestamp :param timestamp: int Epoch timestamp to get footage for :return: str URL to the footage

get_object_count(start_time: Optional[int] = None, end_time: Optional[int] = None) Dict[str, int][source]

Gets the number of detected people and vehicles for a camera :param start_time: int The epoch time to start getting the count for :param end_time: int The end epoch time to get the count for :return: dict that contains “people” and “vehicles” with an int for each one.

Get the thumbnail for an epoch time :param timestamp: int Epoch time to get a thumbnail for :return: str URL to the thumbnail

id
Returns

str camera ID

last_online
Returns

int Epoch time of when the camera was last online

location
Returns

str Street address of the camera

model
Returns

str Model of the camera

name
Returns

str Name of the camera

serial
Returns

Serial number of the camera

site
Returns

str Site that the camera is in

status
Returns

str Status of the camera

verkada_py.camera.set_default_timestamp(func)[source]

Decorator that sets the default time to the current time

verkada_py.organization module

Organization Class

class verkada_py.organization.Organization(get_cameras: bool = True, org_id: Optional[str] = None, api_key: Optional[str] = None)[source]

Bases: SharedAttributes

Organization represents a Verkada organization. It has a api-key and organization ID which is needed to make requests

create_poi(image: str, label: Optional[str] = None) str[source]

Create a person of interest for the organization :param image: str Path to a photo of the person :param label: str Label for the person :return: str Person ID who was created

delete_poi(person_id: str) str[source]

Delete a person of interest :param person_id: str Person ID to delete :return: str Person ID that was deleted

get_notifications(start_time: Optional[int] = None, end_time: Optional[int] = None, include_image: bool = False, notification_types: str = 'person_of_interest,tamper,crowd,motion,camera_offline,camera_online') List[Notification][source]

Get all the notifications for an organization :param start_time: int Start epoch time :param end_time: int` End epoch time :param include_image: ``bool Include the image for notifications :param notification_types: str Notification types to query for :return: list Notifications where each notification is a dict

get_poi() List[PersonofInterest][source]

Get all the people of interest for an organization :return: list People of interest

update_poi(person_id: str, label: str) str[source]

Change a label for a person of interest :param person_id: str Person id to change the label for :param label: str Label of the person :return: str Person ID that had a label change

verkada_py.organization.get_poi_id_from_poi(func)[source]

Decorator that gets a person of interest ID if using custom POI class

verkada_py.shared module

Shared Classes and values

class verkada_py.shared.SharedAttributes(api_key: Optional[str] = None, org_id: Optional[str] = None)[source]

Bases: object

Class that gets used by Organization and Camera class to share attributes

Module contents

__INIT__ File

class verkada_py.Camera(info: dict, api_key: Optional[str] = None, org_id: Optional[str] = None)[source]

Bases: SharedAttributes

Camera class represents a camera in a Verkada Organization.

IP
Returns

str IP of the camera. Likely a private IP

MAC
Returns

str MAC address of the camera

cloud_retention
Returns

int Amount of days of cloud retention

date_added
Returns

int Epoch time when the camera was added to Command

device_retention
Returns

int Amount of days of storage on the camera

firmware
Returns

bool If the firmware is up to date

Get a link to footage for an epoch timestamp :param timestamp: int Epoch timestamp to get footage for :return: str URL to the footage

get_object_count(start_time: Optional[int] = None, end_time: Optional[int] = None) Dict[str, int][source]

Gets the number of detected people and vehicles for a camera :param start_time: int The epoch time to start getting the count for :param end_time: int The end epoch time to get the count for :return: dict that contains “people” and “vehicles” with an int for each one.

Get the thumbnail for an epoch time :param timestamp: int Epoch time to get a thumbnail for :return: str URL to the thumbnail

id
Returns

str camera ID

last_online
Returns

int Epoch time of when the camera was last online

location
Returns

str Street address of the camera

model
Returns

str Model of the camera

name
Returns

str Name of the camera

serial
Returns

Serial number of the camera

site
Returns

str Site that the camera is in

status
Returns

str Status of the camera

class verkada_py.Organization(get_cameras: bool = True, org_id: Optional[str] = None, api_key: Optional[str] = None)[source]

Bases: SharedAttributes

Organization represents a Verkada organization. It has a api-key and organization ID which is needed to make requests

create_poi(image: str, label: Optional[str] = None) str[source]

Create a person of interest for the organization :param image: str Path to a photo of the person :param label: str Label for the person :return: str Person ID who was created

delete_poi(person_id: str) str[source]

Delete a person of interest :param person_id: str Person ID to delete :return: str Person ID that was deleted

get_notifications(start_time: Optional[int] = None, end_time: Optional[int] = None, include_image: bool = False, notification_types: str = 'person_of_interest,tamper,crowd,motion,camera_offline,camera_online') List[Notification][source]

Get all the notifications for an organization :param start_time: int Start epoch time :param end_time: int` End epoch time :param include_image: ``bool Include the image for notifications :param notification_types: str Notification types to query for :return: list Notifications where each notification is a dict

get_poi() List[PersonofInterest][source]

Get all the people of interest for an organization :return: list People of interest

update_poi(person_id: str, label: str) str[source]

Change a label for a person of interest :param person_id: str Person id to change the label for :param label: str Label of the person :return: str Person ID that had a label change