Cameras¶
Cameras API client and functional wrappers for pykada.
The CamerasClient provides access to video feeds, license-plate and
person-of-interest lists, cloud-backup settings, occupancy analytics, and
camera metadata through Verkada’s Cameras API.
Module-level functional wrappers (e.g. get_camera_data()) share a single
lazily-initialized CamerasClient instance so token caching and
connection pooling are preserved across calls.
Client¶
- class pykada.cameras.CamerasClient(api_key=None, token_manager=None)[source]¶
Bases:
BaseClientClient for interacting with Verkada Cameras API.
Initialize the client with either an API key or a token manager. If not key is provided, a default token manager will be used based on the environment configuration (VERKADA_API_KEY in a .env file).
- Parameters:
api_key (
Optional[str]) – Optional API key for authentication.token_manager (
Optional[VerkadaTokenManager]) – Optional token manager for handling tokens.
- get_camera_alerts(start_time=None, end_time=None, include_image_url=None, notification_type=None, page_token=None, page_size=None)[source]¶
- Parameters:
- Returns:
- Return type:
- get_all_camera_alerts(start_time=None, end_time=None, include_image_url=None, notification_type=None)[source]¶
Returns all camera alerts for the organization, walking all pages automatically.
- Parameters:
start_time (
Optional[int]) – Start of the time window (Unix timestamp, seconds).end_time (
Optional[int]) – End of the time window (Unix timestamp, seconds).include_image_url (
Optional[bool]) – WhenTrue, each alert includes a pre-signed image URL.notification_type (
Optional[List[str]]) – Optional list of alert types to filter by.
- Returns:
A generator that yields individual alert dictionaries.
- Return type:
Generator
- get_all_lpois()[source]¶
Returns all License Plates of Interest for the organization, walking all pages automatically.
- Returns:
A generator that yields individual LPOI dictionaries.
- Return type:
Generator
- create_bulk_lpois(filename)[source]¶
Creates a License Plates of Interest in bulk for an organization. Include The csv file containing license plates to be added to the License Plate of Interest list. The column headers for the csv file should be “License Plate”, “Name” for creating LPOIs.
- delete_bulk_lpois(filename)[source]¶
Deletes License Plates of Interest in bulk for an organization. Include The csv file containing license plates to be added to the License Plate of Interest list. The column header for the csv file should be “License Plate”.
- get_all_seen_license_plates(camera_id, license_plate=None, start_time=None, end_time=None)[source]¶
Returns all license-plate detection events for a camera, walking all pages automatically.
- Parameters:
camera_id (
str) – The unique identifier of the camera.license_plate (
Optional[str]) – Optional plate string to filter results to a specific plate.start_time (
Optional[int]) – Start of the time window (Unix timestamp, seconds).end_time (
Optional[int]) – End of the time window (Unix timestamp, seconds).
- Returns:
A generator that yields individual detection dictionaries.
- Return type:
Generator
- get_seen_license_plates(camera_id, license_plate=None, start_time=None, end_time=None, page_size=None, page_token=None)[source]¶
- get_lpr_timestamps(camera_id, license_plate, start_time=None, end_time=None, page_size=None, page_token=None)[source]¶
Returns the timestamps for a certain license plate (only for LPR-enabled cameras_tests).
- Parameters:
camera_id (
str) – The unique identifier of the camera.license_plate (
str) – The license plate number.start_time (
Optional[int]) – Start time for the data (Unix timestamp in seconds).end_time (
Optional[int]) – End time for the data (Unix timestamp in seconds).page_token (
Optional[str]) – Pagination token for the next page.
- Return type:
- Returns:
A dictionary with timestamps for the given camera and license plate.
- get_object_counts(camera_id, start_time=None, end_time=None, page_size=None, page_token=None)[source]¶
- set_object_position_mqtt(broker_cert, broker_host_port, camera_id, client_username=None, client_password=None)[source]¶
Sets the MQTT configuration for a particular camera.
Object Position Events will be published to the specified MQTT broker.
- Parameters:
broker_cert (
str) – CA-signed certificate for TLS connection.broker_host_port (
str) – The host and port for the MQTT server.camera_id (
str) – The unique identifier of the camera.client_username (
str) – Optional username for the MQTT server.client_password (
str) – Optional password for the MQTT server.
- Return type:
- Returns:
The new MQTT configuration.
- get_occupancy_trends(camera_id, start_time=None, end_time=None, interval=None, trend_type=None, preset_id=None)[source]¶
Returns all occupancy trends data for a specified camera over a time range.
- Parameters:
camera_id (
str) – The unique identifier of the camera.start_time (
Optional[int]) – Start time for the data (Unix timestamp in seconds).end_time (
Optional[int]) – End time for the data (Unix timestamp in seconds).interval (
Optional[str]) – Time interval (e.g., 15_minutes, 1_hour, etc.).trend_type (
Optional[str]) – Data type; for example, “person”.
- Return type:
- Returns:
A JSON object with occupancy trends data.
- get_cloud_backup_settings(camera_id)[source]¶
Retrieves cloud backup settings for a specified camera.
- update_cloud_backup_settings(camera_id, days_to_preserve, enabled, time_to_preserve, upload_timeslot, video_quality, video_to_upload)[source]¶
Updates the cloud backup settings for a specified camera.
- Parameters:
camera_id (
str) – The unique identifier of the camera.days_to_preserve (
str) – Delimited list of booleans for each day (e.g., “0,1,1,1,1,1,0”).enabled (
int) – 1 if cloud backup is enabled; otherwise, 0.time_to_preserve (
str) – Delimited list of start_time, end_time for footage backup (e.g., “3600,7200”).upload_timeslot (
str) – Delimited list of start_time, end_time for upload schedule (e.g., “3600,7200”).video_quality (
str) – Video quality (“STANDARD_QUALITY” or “HIGH_QUALITY”).video_to_upload (
str) – Video type (“MOTION” or “ALL”).
- Return type:
- Returns:
The updated cloud backup configuration.
- get_camera_data(page_size=None, page_token=None)[source]¶
Returns details of all cameras_tests within the organization.
- get_footage_link(camera_id, timestamp=None)[source]¶
Returns a link to video footage for a specified camera at a given timestamp.
- get_historical_thumbnail(camera_id, timestamp=None, resolution=None)[source]¶
Returns a thumbnail (low or high resolution) from a specified camera at a given time.
- get_latest_thumbnail(camera_id, resolution=None)[source]¶
Returns the latest thumbnail from a specified camera in low or high resolution.
- get_thumbnail_link(camera_id, timestamp=None, expiry=3600)[source]¶
Returns a link to a thumbnail image from a specified camera at a given timestamp.
- get_pois(page_size=None, page_token=None)[source]¶
Returns details for all Persons of Interest in the organization.
- create_poi(image_url, label)[source]¶
Creates a Person of Interest using a base64-encoded image and label.
- get_dashboard_occupancy_trend_data(dashboard_id, start_time=None, end_time=None, interval=None)[source]¶
Returns occupancy trend data for a specified dashboard.
- get_occupancy_trend_enabled_cameras()[source]¶
Returns the list of cameras in the organization that have occupancy trends enabled.
- Returns:
A dictionary containing camera identifiers and their occupancy-trend status.
- Return type:
- get_max_people_vehicle_counts(camera_id, start_time=None, end_time=None, search_zones=None)[source]¶
Returns the maximum people and vehicle counts for a specified camera.
- get_viewing_stations()[source]¶
Returns a list of viewing stations in an organization.
- Returns:
A list of viewing stations within the organization
- Return type:
- property request_manager: VerkadaRequestManager¶
Returns the request manager used by this client.
Functional wrappers¶
The functions below share a single lazily-initialized CamerasClient
so token caching is preserved across calls.
Cameras API client and functional wrappers for pykada.
The CamerasClient provides access to video feeds, license-plate and
person-of-interest lists, cloud-backup settings, occupancy analytics, and
camera metadata through Verkada’s Cameras API.
Module-level functional wrappers (e.g. get_camera_data()) share a single
lazily-initialized CamerasClient instance so token caching and
connection pooling are preserved across calls.
- pykada.cameras.create_bulk_lpois(filename)[source]
Creates a License Plates of Interest in bulk for an organization. Include The csv file containing license plates to be added to the License Plate of Interest list. The column headers for the csv file should be “License Plate”, “Name” for creating LPOIs.
- Parameters:
filename (
str) – The .csv file for creating the bulk LPOIs- Returns:
The created LPOI objects.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.create_lpoi(license_plate, description)[source]
- Parameters:
- Returns:
object response from Verkada API
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.create_poi(image_url, label)[source]
Creates a Person of Interest using a base64-encoded image and label.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.delete_bulk_lpois(filename)[source]
Deletes License Plates of Interest in bulk for an organization. Include The csv file containing license plates to be added to the License Plate of Interest list. The column header for the csv file should be “License Plate”.
- Parameters:
filename (
str) – The .csv file for deleting the bulk LPOIs- Returns:
The deleted LPOI objects.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.delete_lpoi(license_plate)[source]
- Parameters:
license_plate (
str)- Returns:
- Return type:
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.delete_poi(person_id)[source]
Deletes a Person of Interest from the organization.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- Parameters:
person_id (str)
- pykada.cameras.get_all_camera_alerts(start_time=None, end_time=None, include_image_url=None, notification_type=None)[source]
Returns all camera alerts for the organization, walking all pages automatically.
- Parameters:
start_time (
Optional[int]) – Start of the time window (Unix timestamp, seconds).end_time (
Optional[int]) – End of the time window (Unix timestamp, seconds).include_image_url (
Optional[bool]) – WhenTrue, each alert includes a pre-signed image URL.notification_type (
Optional[List[str]]) – Optional list of alert types to filter by.
- Returns:
A generator that yields individual alert dictionaries.
- Return type:
Generator
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_all_camera_data()[source]
- Returns:
- Return type:
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_all_lpois()[source]
Returns all License Plates of Interest for the organization, walking all pages automatically.
- Returns:
A generator that yields individual LPOI dictionaries.
- Return type:
Generator
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_all_lpr_timestamps(camera_id, license_plate, start_time=None, end_time=None)[source]
- Parameters:
- Returns:
- Return type:
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_all_object_counts(camera_id, start_time=None, end_time=None)[source]
- Parameters:
- Returns:
- Return type:
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_all_pois()[source]
Iterates through paginated results for Persons of Interest.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_all_seen_license_plates(camera_id, license_plate=None, start_time=None, end_time=None)[source]
Returns all license-plate detection events for a camera, walking all pages automatically.
- Parameters:
camera_id (
str) – The unique identifier of the camera.license_plate (
Optional[str]) – Optional plate string to filter results to a specific plate.start_time (
Optional[int]) – Start of the time window (Unix timestamp, seconds).end_time (
Optional[int]) – End of the time window (Unix timestamp, seconds).
- Returns:
A generator that yields individual detection dictionaries.
- Return type:
Generator
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_camera_alerts(start_time=None, end_time=None, include_image_url=None, notification_type=None, page_token=None, page_size=None)[source]
- Parameters:
- Returns:
- Return type:
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_camera_audio_status(camera_id)[source]
Returns the audio status of a specified camera.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- Parameters:
camera_id (str)
- pykada.cameras.get_camera_data(page_size=None, page_token=None)[source]
Returns details of all cameras_tests within the organization.
- Parameters:
- Returns:
A dictionary with camera device information.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_cloud_backup_settings(camera_id)[source]
Retrieves cloud backup settings for a specified camera.
- Parameters:
camera_id (
str) – The unique identifier of the camera.- Returns:
A dictionary of the current cloud backup settings.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_dashboard_occupancy_trend_data(dashboard_id, start_time=None, end_time=None, interval=None)[source]
Returns occupancy trend data for a specified dashboard.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_footage_link(camera_id, timestamp=None)[source]
Returns a link to video footage for a specified camera at a given timestamp.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_historical_thumbnail(camera_id, timestamp=None, resolution=None)[source]
Returns a thumbnail (low or high resolution) from a specified camera at a given time.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_latest_thumbnail(camera_id, resolution=None)[source]
Returns the latest thumbnail from a specified camera in low or high resolution.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_lpois(page_size=None, page_token=None)[source]
-
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_lpr_timestamps(camera_id, license_plate, start_time=None, end_time=None, page_size=None, page_token=None)[source]
Returns the timestamps for a certain license plate (only for LPR-enabled cameras_tests).
- Parameters:
camera_id (
str) – The unique identifier of the camera.license_plate (
str) – The license plate number.start_time (
Optional[int]) – Start of the time range (Unix timestamp in seconds).end_time (
Optional[int]) – End of the time range (Unix timestamp in seconds).page_token (
Optional[str]) – Pagination token for the next page.
- Returns:
A dictionary with timestamps for the given camera and license plate.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_max_people_vehicle_counts(camera_id, start_time=None, end_time=None, search_zones=None)[source]
Returns the maximum people and vehicle counts for a specified camera.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_object_counts(camera_id, start_time=None, end_time=None, page_size=None, page_token=None)[source]
- Parameters:
- Returns:
- Return type:
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_occupancy_trend_enabled_cameras()[source]
Returns cameras_tests enabled for occupancy trends.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_occupancy_trends(camera_id, start_time=None, end_time=None, interval=None, trend_type=None, preset_id=None)[source]
Returns all occupancy trends data for a specified camera over a time range.
- Parameters:
camera_id (
str) – The unique identifier of the camera.start_time (
Optional[int]) – Start time for the data (Unix timestamp in seconds).end_time (
Optional[int]) – End time for the data (Unix timestamp in seconds).interval (
Optional[str]) – Time interval (e.g., 15_minutes, 1_hour, etc.).trend_type (
Optional[str]) – Data type; for example, “person”.
- Returns:
A JSON object with occupancy trends data.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_pois(page_size=None, page_token=None)[source]
Returns details for all Persons of Interest in the organization.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_seen_license_plates(camera_id, license_plate=None, start_time=None, end_time=None, page_size=None, page_token=None)[source]
- Parameters:
- Returns:
- Return type:
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_thumbnail_link(camera_id, timestamp=None, expiry=3600)[source]
Returns a link to a thumbnail image from a specified camera at a given timestamp.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.set_camera_audio_status(camera_id, enabled)[source]
Sets the audio status of a specified camera.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.set_object_position_mqtt(broker_cert, broker_host_port, camera_id, client_username=None, client_password=None)[source]
Sets the MQTT configuration for a particular camera.
Object Position Events will be published to the specified MQTT broker.
- Parameters:
broker_cert (
str) – CA-signed certificate for TLS connection.broker_host_port (
str) – The host and port for the MQTT server.camera_id (
str) – The unique identifier of the camera.client_username (
str) – Optional username for the MQTT server.client_password (
str) – Optional password for the MQTT server.
- Returns:
The new MQTT configuration.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.update_cloud_backup_settings(camera_id, days_to_preserve, enabled, time_to_preserve, upload_timeslot, video_quality, video_to_upload)[source]
Updates the cloud backup settings for a specified camera.
- Parameters:
camera_id (
str) – The unique identifier of the camera.days_to_preserve (
str) – Delimited list of booleans for each day (e.g., “0,1,1,1,1,1,0”).enabled (
int) – 1 if cloud backup is enabled; otherwise, 0.time_to_preserve (
str) – Delimited list of start_time, end_time for footage backup (e.g., “3600,7200”).upload_timeslot (
str) – Delimited list of start_time, end_time for upload schedule (e.g., “3600,7200”).video_quality (
str) – Video quality (“STANDARD_QUALITY” or “HIGH_QUALITY”).video_to_upload (
str) – Video type (“MOTION” or “ALL”).
- Returns:
The updated cloud backup configuration.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.update_lpoi(license_plate, description)[source]
-
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.update_poi(person_id, label)[source]
Updates the label of a Person of Interest.
—
Note: This is a functional wrapper for its equivalent method in the CamerasClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a CamerasClient object directly for better performance.
- pykada.cameras.get_viewing_stations()[source]
Returns a list of viewing stations in an organization.
- Returns:
A list of viewing stations within the organization
- Return type:
—
Note: This is a functional wrapper for its equivalent method in the ViewingStationClient. It creates a new client instance on every call, making it best for single, convenient operations. For making multiple API calls, instantiate and use a ViewingStationClient object directly for better performance.