bloxone.b1 Class

class bloxone.b1(cfg_file='config.ini')[source]

Parent Class to simplify access to the BloxOne APIs for subclasses Can also be used to genericallly access the API

Raises:
create(url, body='')[source]

Generic create object wrapper

Parameters:
  • url (str) – Full URL
  • body (str) – JSON formatted data payload
Returns:

Requests response object

Return type:

response object

delete(url, id='', body='')[source]

Generic delete object wrapper

Parameters:
  • url (str) – Full URL
  • id (str) – Object id to delete
  • body (str) – JSON formatted data payload
Returns:

Requests response object

Return type:

response object

get(url, id='', action='', **params)[source]

Generic get object wrapper

Parameters:
  • url (str) – Full URL
  • id (str) – Optional Object ID
  • action (str) – Optional object action, e.g. “nextavailableip”
Returns:

Requests response object

Return type:

response object

post(url, id='', action='', body='', **params)[source]

Generic Post object wrapper

Parameters:
  • url (str) – Full URL
  • id (str) – Optional Object ID
  • action (str) – Optional object action, e.g. “nextavailableip”
Returns:

Requests response object

Return type:

response object

replace(url, id='', body='')[source]

Generic create object wrapper

Parameters:
  • url (str) – Full URL
  • body (str) – JSON formatted data payload
Returns:

Requests response object

Return type:

response object

update(url, id='', body='')[source]

Generic create object wrapper

Parameters:
  • url (str) – Full URL
  • body (str) – JSON formatted data payload
Returns:

Requests response object

Return type:

response object

class bloxone.IniFileSectionError[source]

Exception for missing section in ini file

class bloxone.IniFileKeyError[source]

Exception for missing key in ini file

class bloxone.APIKeyFormatError[source]

Exception for API key format mismatch