Changelogs » Balena-sdk

PyUp Safety actively tracks 262,873 Python packages for vulnerabilities and notifies you when to upgrade.

Balena-sdk

10.1.1

* Patch get_metrics() return [Vipul Gupta (vipulgupta2048)]

10.1.0

* Update test case for application.create [Trong Nghia Nguyen]
  * Update documentation [Trong Nghia Nguyen]
  * Implement device.get_metrics() [Vipul Gupta (vipulgupta2048)]

10.0.0

* Update docs [Trong Nghia Nguyen]
  * Add python v3.7 and v3.8 to travis.yml [Trong Nghia Nguyen]
  * Update tests to support orgs model [Trong Nghia Nguyen]
  * Update release.create_from_url() to support orgs model [Trong Nghia Nguyen]
  * **BREAKING** Change the device_type of all models to resource references [Trong Nghia Nguyen]
  * **BREAKING** Change application and device commit to release references [Trong Nghia Nguyen]
  * Clarify that application.get_by_owner now accepts organization handles [Trong Nghia Nguyen]
  * **BREAKING** Require an organization when creating applications [Trong Nghia Nguyen]
  * Add methods for the organization model [Trong Nghia Nguyen]
  * **BREAKING** Add support for the v6 orgs model [Trong Nghia Nguyen]

9.5.0

* Add device.get_mac_address() [Trong Nghia Nguyen]

9.4.1

* README: Clarify the deprecation policy [Thodoris Greasidis]

9.4.0

* Add a deprecation policy [Trong Nghia Nguyen]

9.3.0

* Implement application.get_dashboard_url() [Trong Nghia Nguyen]

9.2.1

* Update tag.set() and tag.remove() test [Trong Nghia Nguyen]
  * Fix tag.get_all() test [Trong Nghia Nguyen]
  * Fix application.has_any() method [Trong Nghia Nguyen]

9.2.0

* Os: Add device_os.download_unconfigured_image() method [Trong Nghia Nguyen]
  * Os: Fix device_os.download() method [Trong Nghia Nguyen]

9.1.0

* Device-type: Change EXPERIMENTAL device type name normalization to NEW [Trong Nghia Nguyen]

9.0.1

* Docs: minor fixes to docstrings [Matthew McGinn]

9.0.0

* Auth: Stop sending api key in query string [Trong Nghia Nguyen]
  * Docs: Update documentation [Trong Nghia Nguyen]
  * Auth: Prioritize auth token over API_KEY [Trong Nghia Nguyen]
  * Fix using python logging BasicConfig [Thomas Cahill]
  * Device: Add local mode related methods [Trong Nghia Nguyen]
  * Release: Add release.create_from_url method [Trong Nghia Nguyen]
  * Os: Allow mixing armv7 and aarch64 devices in RPI 1/zero apps [Trong Nghia Nguyen]
  * Release: Support retrieving releases & managing release tags by commit [Trong Nghia Nguyen]

8.1.1

* Supervisor: Fix wrong SUPERVISOR_API_KEY env var name [Trong Nghia Nguyen]

8.1.0

* Docs: Update docs [Trong Nghia Nguyen]
  * Device: Allow moving aarch64 devices to armv7hf applications [Trong Nghia Nguyen]
  * Os: Add device_os.is_architecture_compatible_with method [Trong Nghia Nguyen]

8.0.1

* Release: Fix commit returned by release.get_latest_by_application() [Trong Nghia Nguyen]

8.0.0

* Docs: Update DOCUMENTATION [Trong Nghia Nguyen]
  * Sdk: Update service details related methods based on latest SDK changes [Trong Nghia Nguyen]
  * Device: Drop $tolower in get_with_service_details() to make it faster [Trong Nghia Nguyen]

7.9.0

* Docs: Update DOCUMENTATION [Trong Nghia Nguyen]
  * Device: Update get_status method based on latest JS SDK changes [Trong Nghia Nguyen]

7.8.1

* Fix `deleted` status casing in tests [Pagan Gazzard]

7.8.0

* Endpoint: Use open-balena-api endpoints for device type & version info [Trong Nghia Nguyen]

7.7.2

* Env_var: Fix POST parameter name [eugenefab]

7.7.1

* Docs: Add installation guide for Python SDK [Trong Nghia Nguyen]

7.7.0

* hup: Add device OS update methods [Trong Nghia Nguyen]

7.6.0

* Device: Add method to set device to specific release_id [Amir Fuhrmann]
  * Device: Fix issue with device.set_to_release() [Trong Nghia Nguyen]

7.5.0

* Device: Add support for get_supervisor_target_state device method [Matthew McGinn]

7.4.2

* ServiceEnvVar: Fix bug in service_env_var.create() [Trong Nghia Nguyen]

7.4.1

* Device: replace 'last_seen_time' with 'last_vpn_event', add unit test [Matthew McGinn]

7.4.0

* Codeowners: add codeowners as myself and nghiant2710 [Matthew McGinn]

7.3.1

* Git: gitignore build output dir [Matthew McGinn]

7.3.0

* Device: Add get_supervisor_state device method [Trong Nghia Nguyen]

7.2.1

* Update documentation for application methods [Lucian]

7.2.0

* Docs: Update docs [Trong Nghia Nguyen]
  * Device: Implement device lock override methods [Trong Nghia Nguyen]

7.1.0

* Application: Add options parameter to application.get_config() [Trong Nghia Nguyen]

7.0.0

* Docs: Update documentation [Trong Nghia Nguyen]
  * StageRelease: Add release tracking methods [Trong Nghia Nguyen]
  * Application: Implement application.get_by_owner() [Trong Nghia Nguyen]
  * Api: Use the v5 api endpoint [Trong Nghia Nguyen]
  * Application.get_all: use the my_application endpoint [Trong Nghia Nguyen]
  * Config: Use Opensource API endpoint for fetching device types [Trong Nghia Nguyen]

6.0.1

* Make docs_generator.py work with Python2/3 [Matthew McGinn]
  * Fix up documentation examples [Matthew McGinn]

6.0.0

* Api: Change api endpoint to api.balena-cloud.com [Trong Nghia Nguyen]
  * Namechange: Remove old resin stuff [Trong Nghia Nguyen]
  * *BREAKING*: Rename everything that references 'resin' to 'balena' [Tim Perry]

5.1.3

* Print a deprecation warning message when using the unrenamed SDK [Tim Perry]

5.1.2

* Don't mention our production Mixpanel token in examples/docs [Juan Cruz Viotti]

5.1.1

* Allow overriding the API endpoint for testing [Tim Perry]
  * Document how to setup & run the SDK tests [Tim Perry]

5.1.0

* Test: Add test cases for tag models [Trong Nghia Nguyen]
  * Release-tag: Fix wrong filter in get_all_by_release() [Trong Nghia Nguyen]
  * Tag: Fix incorrect behavior when updating tag [Trong Nghia Nguyen]
  * Test: Update error message in application test [Trong Nghia Nguyen]
  * Resin/__init__: Remove unused import [Antonio Gutierrez]

5.0.0

* Logging: Add support for new logging endpoint 102 [Trong Nghia Nguyen]
  * Application: Return collaborator app application.get_all() 102 [Trong Nghia Nguyen]
  * Supervisor: Implement supervisor.start/stop/restart_service methods 102 [Trong Nghia Nguyen]
  * Supervisor: Deprecate some old methods 102 [Trong Nghia Nguyen]
  * Supervisor: Remove enable/disable_tcp_ping 102 [Trong Nghia Nguyen]
  * Serivce_env_var: Rename get_all() to get_all_by_application() 102 [Trong Nghia Nguyen]
  * Env_var: Add get_all_by_application() to device service env var 102 [Trong Nghia Nguyen]
  * Config_var: Add get_all_by_application() to device config variable 102 [Trong Nghia Nguyen]
  * Device_os: The version option in device_os.get_config() is now required 102 [Trong Nghia Nguyen]

4.7.1

* Logging: Print deprecation warning for all legacy logs methods 96 [Trong Nghia Nguyen]

4.7.0

* Implement resin.models.device.set_to_release() to set device to a specific commit. 92 [Trong Nghia Nguyen]
  * Implement resin.models.application.set_to_release() to set an application to a specific commit. 92 [Trong Nghia Nguyen]

4.6.0

* Allow moving devices to applications of the same arch type. 94 [Trong Nghia Nguyen]

4.5.0

* Update docs. 90 [Trong Nghia Nguyen]

4.4.1

* Update docs 87 [Trong Nghia Nguyen]

4.4.0

* Add resin.model.tag.ReleaseTag that implements release tag model for Resin Python SDK. 83 [Trong Nghia Nguyen]

4.3.0

* Re-add resin.models.environment_variables.ApplicationEnvVariable model. 84 [Trong Nghia Nguyen]
  * Re-add resin.models.environment_variables.DeviceEnvVariable model. 84 [Trong Nghia Nguyen]

4.2.1

* Add unit test for device class. 82 [Trong Nghia Nguyen]

4.2.0

* Add resin.model.tag.ApplicationTag that implements Application tag model for Resin Python SDK. 80 [Trong Nghia Nguyen]
  * Add resin.model.tag.DeviceTag that implements device tag model for Resin Python SDK. 80 [Trong Nghia Nguyen]

4.1.0

* Remove low level class resin.Token since all features are now merged into resin.Auth 79 [Trong Nghia Nguyen]
  * Revamp resin.Auth model to work with Auth Token and API token. 79 [Trong Nghia Nguyen]
  * Add resin.models.api_key.ApiKey class that implements user API key model for Resin Python SDK. 79 [Trong Nghia Nguyen]

4.0.0

* *BREAKING* Change application.create() to support application types. 76 [Trong Nghia Nguyen]
  * *BREAKING* Change device.name to device.device_name everywhere. 76 [Trong Nghia Nguyen]
  * *BREAKING* Remove resin.models.build model which is replaced by release model. Remove resin.models.device.set_to_build() function. 76 [Trong Nghia Nguyen]
  * Implement resin.models.config_variable.ApplicationConfigVariable model. 76 [Trong Nghia Nguyen]
  * Implement resin.models.config_variable.DeviceConfigVariable model. 76 [Trong Nghia Nguyen]
  * *BREAKING* Remove resin.models.environment_variables.ApplicationEnvVariable since it no longer exists in the model. Implement resin.models.environment_variables.ServiceEnvVariable model 76 [Trong Nghia Nguyen]
  * *BREAKING*: Remove resin.models.DeviceEnvVariable since it no longer exist in the model. Implement resin.models.DeviceServiceEnvVariable model to work with Device Service Variables. 76 [Trong Nghia Nguyen]
  * Add resin.models.service model to lookup for services. 76 [Trong Nghia Nguyen]
  * Add resin.models.image to look up individual image build. 76 [Trong Nghia Nguyen]
  * *Breaking*: Move to API v4 (Multicontainer support). 76 [Trong Nghia Nguyen]

3.0.0

* Fix device.get_status() function, use `last_vpn_event` field instead of `last_seen_time` since it no longer exists. 75 [Trong Nghia Nguyen]
  * Fix return object of `create` functions to ensure they return a dict. 75 [Trong Nghia Nguyen]
  * Fix resin.models.application.create() return object. 75 [Trong Nghia Nguyen]
  * Update device.set_to_build() to work with latest API. Change the argument from build id to build commit hash since build id is not available on the dashboard. 75 [Trong Nghia Nguyen]

2.2.0

* Drop support for Python 2.6 Python 2.6 is pretty old and has been EOL since 2013. It is also not compatible with current test suite. 69 [Trong Nghia Nguyen]
  * Properly parse request data before sending. 69 [Trong Nghia Nguyen]
  * Add the test suite to Travis. 69 [Trong Nghia Nguyen]
  * Ensure the test suite refuses to run with an admin user account. 69 [Trong Nghia Nguyen]
  * Implement unit test for application class. 69 [Trong Nghia Nguyen]

2.1.1

* Add `versionist.conf.js` config and prepare for VersionBot control. 58 [Heds Simons]

2.1.0

Added
  
  - Add a timeout for all requests (defaults to 30 seconds).
  - Add Build class to the docs.
  - Add details about the old and new returned objects from old and new API.

2.0.0

Added
  
  - Add support for Python 3.
  - Implement base class for resin exceptions.
  
  Changed
  
  - Fix a bug in `resin.models.device.get_all_by_application()` to make it
  works with API v3.

1.7.0

Added
  
  - Implement `device.get_dashboard_url()` that return the Resin Dashboard URL for a specific device.
  - Implement `device_os.get_config()` that retrieves an application config.json.
  - Implement `application.enable_device_urls()` and `application.disable_device_urls()` that enable/disable the URL for all devices belong to an application.
  - Implement methods at device and application level for granting and revoking support access.
  - Implement `application.generate_provisioning_key()` that generates a device provisioning key for a specific application.
  
  Changed
  
  - Upgrade Pine endpoint to Resin API v3.
  - Add validation for environment variable name.
  - Update `device.register()`, device registration now uses provisioning key.

1.6.3

Changed
  
  - Add additional API endpoints: `resin.models.application.enable_rolling_updates()`, `resin.models.application.disable_rolling_updates()`, `resin.models.device.get_all_by_application_id()` and `resin.models.device.set_to_build()` by [amirfuhrmann](https://github.com/amirfuhrmann)

1.6.2

Changed
  
  - Fix issue with auth.is_logged_in() raises Unauthorized exception.

1.6.1

Added
  
  - Implement resin.models.environment_variables.device.get_all_by_application().
  - Implement Build class (`resin.models.build.get()` and `resin.models.build.get_all_by_application()`).
  - Implement `resin.models.device.set_custom_location()` and `resin.models.device.unset_customer_location()`.
  - Implement `resin.models.device.generate_device_key()` that can generate a device specific key for use by a device.
  - Implement `resin.models.application.get_config()` for downloading an application config.json file.
  
  Changed
  
  - Deprecated `resin.models.application.get_api_key()`.
  - Make all device env vars consistently return names as .name.
  - Ensure application and device .get handle arguments clearly.

1.5.4

Changed
  
  - Allow passing option to force device reboot and shutdown.
  - Specify version of pubnub lib since pubnub v4 is not supported yet.
  - Remove unused import.

1.5.3

Changed
  
  - Import print_function to support python3 print syntax when output error message to STDERR.

1.5.2

Changed
  
  - Output error messages to STDERR

1.5.1

Changed
  
  - Fix issue with PubNub logs channel. If available, use device.logs_channel for PubNub channel names.

1.5.0

Added
  
  - Implement resin.models.supervisor.enable_tcp_ping().
  - Implement resin.models.supervisor.disable_tcp_ping().
  - Implement resin.models.supervisor.regenerate_supervisor_api_key().
  - Implement resin.models.supervisor.get_device_state().
  - Implement resin.models.supervisor.stop_application().
  - Implement resin.models.supervisor.get_application_info().
  - Implement resin.models.supervisor.start_application().
  
  Changed
  
  - Update all functions in resin.models.supervisor, Use device_uuid instead of device_id for ease of use.

1.4.0

Added
  
  - Implement resin.models.device.get_status()
  
  Changed
  
  - Patch device types to be marked as ALPHA and BETA not PREVIEW and EXPERIMENTAL.
  - Fix error when reading settings by backing up old settings file and rewriting default settings.
  - Fix bug of device.get_local_ip_address().

1.3.1

Changed
  
  - Fix bug with return value of `resin.auth.is_logged_in()`.

1.3.0

Added
  
  - Implement resin.models.device.move().

1.2.0

Added
  
  * Implement Resin Supervisor which provides an easy way to interact with the Supervisor agent on your device:
  - resin.models.supervisor.ping()
  - resin.models.supervisor.blink()
  - resin.models.supervisor.update()
  - resin.models.supervisor.reboot()
  - resin.models.supervisor.shutdown()
  - resin.models.supervisor.purge()
  - resin.models.supervisor.restart()
  - resin.models.supervisor.force_api_endpoint()
  * Implement basic two-factor authentication functionalities:
  - resin.models.twofactor_auth.is_enabled()
  - resin.models.twofactor_auth.is_passed()
  - resin.models.twofactor_auth.challenge()
  - resin.models.twofactor_auth.generate_code()
  - resin.models.twofactor_auth.get_otpauth_secret()

1.1.1

Changed
  
  - Update `setup.py` parse VERSION directly from `__init__.py` instead of importing resin.

1.1.0

Added
  
  - Implement Resin API Key. User can authorize by credentials, auth token or set Resin API key as RESIN_API_KEY environment variable.
  - Implement `resin.models.device.restart()`
  - Implement `resin.models.device.has_device_url()`
  - Implement `resin.models.device.get_device_url()`
  - Implement `resin.models.device.enable_device_url()`
  - Implement `resin.models.device.disable_device_url()`
  
  Changed
  
  - Fix `resin.auth.is_logged_in()` remove auth token.
  - Fix bug with API endpoints in some functions.
  - Implement `login` flag that marks functions only work if users authorize by credentials or auth token.
  
  Removed
  
  - Remove `VALID_OPTIONS` in resin.models.device_os that blocks extra os parameters when downloading an image.
  - Remove `resin.models.config.get_pubnub_keys()`.