Overview
* Many docs improvements.
* Docs will be hosted soon.
* Data returned from SDK methods are much more user friendly.
Breaking Changes
* `Cameras.images_range()` removed.
* Functionality merged into `Cameras.images()`.
* `download_images()` removed from all core API.
* Download functionality merged into `show_image()` and `preview()`.
* See below for changes to the data returned from many methods.
New Features
* Effort to improve ease of use when dealing with returned data.
* An `Observations.index()` call would previously return a list of dictionaries. These dictionaries are formatted as GeoJSON feature collections. The user would have to parse this list of dictionaries to extract meaningful data.
* This call will now return an `IndexResult` instance. This is an iterator for the features returned in all feature collections. Important data will be automatically parsed and accessible to the user via convenience properties and iteration.
* Authentication is now deferred until after initial import.
* Introduced a `Session` class to contain authentication details.
* Can be started and reused for multiple core API instances.
* Creating instances of any core API will automatically start a `Session` using the stored credentials in a .helios_auth file or environment variables. This means there are no breaking changes.
* By allowing for dynamic authentication, rather than at import time, Python does not need to be restarted if your access token expires. A new `Session` or core API instance can be created instead.
`Session` example:
Python
import helios
Reuse session
sess = helios.Session()
obs_inst = helios.Observations(session=sess)
alerts_inst = helios.Alerts(session=sess)
Automatically create session within each instance.
obs_inst = helios.Observations()
alerts_inst = helios.Alerts()
Alerts
* The `index` method will return an instance of `IndexResults`
* The `show` method will return an instance of `ShowResults`
Cameras
* The `index` method will return an instance of `IndexResults`
* The `show_image` method will return an instance of `ShowImageResults`
* The `show` method will return an instance of `ShowResults`
Collections
* The `index` method will return an instance of `IndexResults`
* The `preview` method will return an instance of `PreviewResults`
* The `show` method will return an instance of `ShowResults`
* Added `delete` method.
* This will completely remove a collection that is empty.
* If the collection is not empty this will fail.
* Added `empty` method.
* Call this method to bulk delete up to 1000 images at a time from a collection.
Observations
* The `add_image` method will return an instance of `AddImageResults`
* The `index` method will return an instance of `IndexResults`
* The `remove_image` method will return an instance of `RemoveImageResults`
* The `show_image` method will return an instance of `ShowImageResults`
* The `show` method will return an instance of `ShowResults`
* `IndexResults` and `ShowResults` have a method called `sensors_to_dataframes`.
* Calling this method will extract important information associated with sensors and return Pandas DataFrame instances for each sensor.
* Extracted information: time, sensor name, value, previous value, ID, and previous ID.
* Optionally, data can be written to CSV files. (one file per sensor)
Example to show off some of the new functionality:
Python
import helios
obs_inst = helios.Observations()
index_results = obs_inst.index(state=='georgia')
index_results will be an IndexResults instance.
ids = [x.id for x in index_results] iterate over features.
ids_atlanta = [x.id for x in index_results if x.city == 'Atlanta'] Selective return from iteration.
or for convenience.
ids = index_results.id gather all IDs
cities = index_results.city gather all city data.
Gather important sensor data, write to CSV files, and return Pandas DataFrames.
sensor_data = index_results.sensors_to_dataframes(output_dir='/data')
Debug failed calls in batch jobs.
failed = index_results.failed