Xs1-api-client

Latest version: v3.0.1

Safety actively analyzes 628903 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

2.2.0

* fixed "disabled" comparison
* improved parameter processing
* parameter keys and values can now be of any type
* if a key is defined as a ApiConstant as well as some other type (so it is ambiguous) the ApiConstant value will always take priority
* added ApiConstant Enum base class that all other Enums inherit from
* added __eq__ method for ApiConstant
* ApiConstants and strings can now be easily compared using the "==" operator
* added test for ApiConstant __eq__ method
* added api method for querying currently set host, user & password
* only update config info at init when a host is passed in
* refactored send_request method for better testability
* added many tests with mocked api responses taken from my own gateway
* added "host is None" check before trying to send a request
* added some missing ApiConstants like HC1 and HC2
* small documentation fixes
* code cleanup

2.1.3

* ActuatorType comparison fix
* pypi module fix

2.1.0

* added failure tolerance when sending requests
* Requests will now be sent up to 5 times with an increasing backoff time between the retries
* test fixes
* build script improvements

2.0.0

Breaking changes:
* removed python 3.3 support, this library is now python 3.4+
* removed global host/user/pw configuration mechanism for much cleaner code
* api_constants now uses Enums instead of simple variables, strings can still be used though

Other changes:
* added many api methods:
* retrieve main configuration
* retrieve a list of compatible systems
* retrieve a list of available functions
* retrieve compatible types of actuators and sensors
* retrieve a single actuator/sensor by id
* retrieve **and set** the current configuration of actuators and sensors
* set the name of a device on the xs1
* additional methods for finding functions within an actuator by id or type
* added "enabled" parameter to "get_all_*" methods to easily be able to filter disabled devices
* improved error handling
* added \_\_str\_\_ overrides for easier printing of objects
* improved type documentation
* refactored base classes to \_\_init\_\_.py
* added Travis CI with build status in readme
* added codebeat
* added simple test
* added examples

1.0.1

- fix to support python 3.4

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.