rest module

RESTClientObject

class edgeimpulse_api.rest.RESTClientObject(
		configuration,
		pools_size=4,
		maxsize=None
)

Parameters

  • configuration

  • pools_size=4

  • maxsize=None

Methods

delete_request

edgeimpulse_api.rest.delete_request(
		self,
		url,
		headers=None,
		query_params=None,
		body=None
)

Parameters

  • self

  • url

  • headers=None

  • query_params=None

  • body=None

get_request

edgeimpulse_api.rest.get_request(
		self,
		url,
		headers=None,
		query_params=None
)

Parameters

  • self

  • url

  • headers=None

  • query_params=None

head_request

edgeimpulse_api.rest.head_request(
		self,
		url,
		headers=None,
		query_params=None
)

Parameters

  • self

  • url

  • headers=None

  • query_params=None

options_request

edgeimpulse_api.rest.options_request(
		self,
		url,
		headers=None,
		query_params=None,
		post_params=None,
		body=None
)

Parameters

  • self

  • url

  • headers=None

  • query_params=None

  • post_params=None

  • body=None

patch_request

edgeimpulse_api.rest.patch_request(
		self,
		url,
		headers=None,
		query_params=None,
		post_params=None,
		body=None
)

Parameters

  • self

  • url

  • headers=None

  • query_params=None

  • post_params=None

  • body=None

post_request

edgeimpulse_api.rest.post_request(
		self,
		url,
		headers=None,
		query_params=None,
		post_params=None,
		body=None
)

Parameters

  • self

  • url

  • headers=None

  • query_params=None

  • post_params=None

  • body=None

put_request

edgeimpulse_api.rest.put_request(
		self,
		url,
		headers=None,
		query_params=None,
		post_params=None,
		body=None
)

Parameters

  • self

  • url

  • headers=None

  • query_params=None

  • post_params=None

  • body=None

request

edgeimpulse_api.rest.request(
		self,
		method,
		url,
		query_params=None,
		headers=None,
		body=None,
		post_params=None
)

Perform requests.

Parameters

  • self

  • method

  • url

  • query_params=None

  • headers=None

  • body=None

  • post_params=None

RESTResponse

class edgeimpulse_api.rest.RESTResponse(
		resp
)

The abstract base class for all I/O classes.

This class provides dummy implementations for many methods that derived classes can override selectively; the default implementations represent a file that cannot be read, written or seeked.

Even though IOBase does not declare read, readinto, or write because their signatures will vary, implementations and clients should consider those methods part of the interface. Also, implementations may raise UnsupportedOperation when operations they do not support are called.

The basic type used for binary data read from or written to a file is bytes. Other bytes-like objects are accepted as method arguments too. In some cases (such as readinto), a writable object is required. Text I/O classes work with str data.

Note that calling any method (except additional calls to close(), which are ignored) on a closed stream should raise a ValueError.

IOBase (and its subclasses) support the iterator protocol, meaning that an IOBase object can be iterated over yielding the lines in a stream.

IOBase also supports the :keyword:with statement. In this example, fp is closed after the suite of the with statement is complete:

with open('spam.txt', 'r') as fp: fp.write('Spam and eggs!')

Parameters

  • resp

Bases

  • io.IOBase

  • _io._IOBase

Methods

getheader

edgeimpulse_api.rest.getheader(
		self,
		name,
		default=None
)

Returns a given response header.

Parameters

  • self

  • name

  • default=None

getheaders

edgeimpulse_api.rest.getheaders(
		self
)

Returns a dictionary of the response headers.

Parameters

  • self

Last updated