Using the Core APIs

Creating Instances

Instances of the core APIs are easy to create.

import helios
alerts = helios.Alerts()
cameras = helios.Cameras()
observations = helios.Observations()
collections = helios.Collections()

Each instance will internally initialize a Helios Session and call start_session.


Find alerts

import helios
alerts = helios.Alerts()

# Retrieve ressults for New York.
ny_alert_results = alerts.index(state='New York')

# Gather the camera IDs from the results.
ny_alert_ids =

Find camera times and download images

import helios
import numpy as np

cameras = helios.Cameras()

# Find cameras in Maryland.
md_cam_results = cameras.index(state='Maryland')
cam_id =[0]

# Find image times for the given camera id.
image_times = cameras.images(cam_id, '2018-01-01')

# Download the images.
show_image_results = cameras.show_image(cam_id,

# Get a list of image data. (return_image_dat was True)
img_data = show_image_results.image_data

Find observations and work with collections

import helios
import requests
from helios.utilities import parsing_utils

observations = helios.Observations()
collections = helios.Collections()

# Find Observations
index_results = observations.index(state='georgia',

# Get id for each observation feature.
ids = [ for x in index_results.features]

# Convenience properties also exist for combining attributes from all features.
ids_1 =

# Create new collection.
new_id = collections.create('Temp Collection', 'example collection', ['test', 'temp'])

# Add Observations to collection.
payload = [{'observation_id': x} for x in ids]
add_result = collections.add_image(new_id, payload)

# Check for http failures.
if len(add_result.failed) > 0:
    print('Failures occurred!')

# Simple data analysis - find all unique cameras for the added observation images.
ims = collections.images(new_id)
cams = set([parsing_utils.parse_camera(x) for x in ims])