preheat_open.api

This module defines the basics of the interaction with Neogrid’s web API

Functions

api_get(endpoint[, out, payload, headers, ...])

Method to send a GET request to the API

api_post(endpoint[, out, json_payload, bare_url])

Method to send a POST request to the API

api_put(endpoint[, json_payload, bare_url])

Method to send a PUT request to the API

api_string_to_datetime(t)

Converts a datetime string from the API to a python datetime

configuration_file_path()

Determines the path of the configuration file to be used.

datetime_to_api_string(t)

Converts a python datetime to a string ready for use in the API I/O

ids_list_to_string(list2use[, separator])

Helper function to turn list into string, e.g.

load_configuration()

Loads the API configuration

set_api_key(api_key)

Sets the API key

set_api_url(api_url)

Only kept for backwards compatibility

Classes

ApiSession(*args, **kwargs)

Singleton class to handle API connection sessions