F3RR3T / ausPestCheck-API

Scripts for API clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ausPestCheck-API

Scripts for web service clients.

Quick start

  • Create a config file in the conf folder.
    • Use the template to enter your own credentials and endpoint parameters
  • Using a python interactive console, execute callAPI.py.
    • This loads the functions and config parameters as objects.
  • Execute simulateOccurrence.py
    • This loads several functions that combine to create occurrence records. Together, these records are called the 'payload'. It also runs a couple of API calls to create a local copy of the pest list in the variable pestList
  • invoke 'uploadObs(createPayload())' at the prompt
    • this will upload 3 occurrence records in the Great Australian Bight.
  • Change the num, state and pestIDs as desired.

You can also print the occurence records as a CSV file by executing writeCSV.py and then using 'writeObs(payload)'.

TODO

Upload utility functions to download, edit, filter on some criterion, delete and update records using the API.

About

Scripts for API clients

License:MIT License


Languages

Language:Python 100.0%