Class ProteusClientApi

class proteus.api.client.ProteusClientApi(api_url=None, api_user=None, api_password=None)[source]

Bases: object

Low Level Proteus SOAP Wrapper Class

Constructor

Parameters:
  • api_url : string
  • api_user : string
  • api_password : string
Example:
>>> from proteus.api import ProteusClientApi
>>> pc=ProteusClientApi(
    'http://proteus.domain.tld/',
    'username',
    'password')
_connect()[source]

Establish connection to Proteus SOAP Service

_disconnect()[source]

Disconnect from Proteus SOAP Service

_get_entities(parent_id, entity_type, start=1, count=1)[source]

Get a list of Proteus Entities

Parameters:
  • parent_id : int
  • entity_type : string [ use one of the TYPE_* constants from proteus.api.constants ]
  • start : int [1-based]
  • count : int
Returns:

APIEntityArray

_get_entity_by_name(parent_id, entity_name, entity_type)[source]

Wrapper for Proteus SOAP API Method getEntityByName

Parameters:
  • parent_id : int
  • entity_name : string
  • entity_type : string [ use one of the TYPE_* constants from proteus.api.constants ]
Returns:

APIEntity

is_valid_connection()[source]

Checks if the client is connected and authenticated

login()[source]

Connect and login

Example:
>>> from proteus.api import ProteusClientApi
>>> pc=ProteusClientApi(
    'http://proteus.domain.tld/',
    'username',
    'password')
>>> pc.login()
logout()[source]

Logout and disconnect

Example:
>>> from proteus.api import ProteusClientApi
>>> pc=ProteusClientApi(
    'http://proteus.domain.tld/',
    'username',
    'password')
>>> pc.login()
>>> ...
>>> pc.logout()