Skip to content

SDK and sample code for interacting with the Environmental Intelligence Suite - (Weather) History on Demand

License

Notifications You must be signed in to change notification settings

IBM/hod-archive-sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

History on Demand - Python SDK

This is a small Python package with a single module / script for submitting Jobs read from a CSV to HoD Archive via its REST API.

Documentation

Dependencies

Quick start

You'll need:

Jobs CSV

The CSV must contain a header line that includes a startDateTime, endDateTime, location, format, units, and resultsLocation. Header names are case-insensitive and may contain underscores, hyphens, and spaces. Column order does not matter.

CSV values should match the formats expected by the HoD Archive API. Because most location expressions contain commas, it's a good idea to surround that value in quotes. For more details, see the HoD Archive documentation and sample-jobs.csv in the sampledata directory.

Example usage

$ ./hodarchive/hodarchive.py --jobs ./sampledata/sample-jobs.csv --api-key 1234
Job (cbb54705-82fd-4919-baed-6ff02b175ade) submitted from line 1.
Job (6b6b79cb-1427-4fbb-ad49-40baedef3fd3) submitted from line 2.
Job (0a495e7a-add2-4f8c-8fbf-cc1080e8c26b) submitted from line 3.
Job (4d536173-a418-47c1-8000-907f537897c1) submitted from line 4.
Job (6b6b79cb-1427-4fbb-ad49-40baedef3fd3) complete. rowsReturned=209 usage=209
Job (0a495e7a-add2-4f8c-8fbf-cc1080e8c26b) complete. rowsReturned=72 usage=3
Job (4d536173-a418-47c1-8000-907f537897c1) complete. rowsReturned=1 usage=1
Job (cbb54705-82fd-4919-baed-6ff02b175ade) complete. rowsReturned=6 usage=1

Results:

Jobs run: 4, Errors: 0

Questions and support

For support, please contact twcapi@us.ibm.com.

Open source @ IBM

Find more open source projects on the IBM Github page.

License

This SDK is distributed under the Apache License, Version 2.0. To read the full text of the license, see LICENSE.

About

SDK and sample code for interacting with the Environmental Intelligence Suite - (Weather) History on Demand

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages