v10.2.0 (DEPRECATED)
pip install balena-sdkhttps://github.com/balena-io/balena-sdk-python>>> from balena import Balena
>>> balena = Balena()
>>> credentials = {'username':<your email>, 'password':<your password>}
>>> balena.auth.login(**credentials)
...Table of Contents
Models
Application
Function: create(name, device_type, organization, app_type)
Function: disable_device_urls(app_id)
Function: disable_rolling_updates(app_id)
Function: enable_device_urls(app_id)
Function: enable_rolling_updates(app_id)
Function: generate_provisioning_key(app_id)
Function: get(name)
Function: get_all()
Function: get_all_with_device_service_details(expand_release)
Function: get_by_id(app_id)
Function: get_by_owner(name, owner)
Function: get_config(app_id, version)
Function: get_dashboard_url(app_id)
Function: get_target_release_hash(app_id)
Function: get_with_device_service_details(name, expand_release)
Function: grant_support_access(app_id, expiry_timestamp)
Function: has(name)
Function: has_any()
Function: is_tracking_latest_release(app_id)
Function: remove(name)
Function: restart(name)
Function: revoke_support_access(app_id)
Function: set_to_release(app_id, full_release_hash)
Function: track_latest_release(app_id)
Function: will_track_new_releases(app_id)
ApiKey
Function: create_api_key(name, description)
Function: get_all()
Function: revoke(id)
Function: update(id, api_key_info)
Config
Function: get_all()
Function: get_device_types()
ConfigVariable
ApplicationConfigVariable
Function: create(app_id, config_var_name, value)
Function: get_all(app_id)
Function: remove(var_id)
Function: update(var_id, value)
DeviceConfigVariable
Function: create(uuid, config_var_name, value)
Function: get_all(uuid)
Function: get_all_by_application(app_id)
Function: remove(var_id)
Function: update(var_id, value)
Device
Function: disable_device_url(uuid)
Function: disable_local_mode(uuid)
Function: disable_lock_override(uuid)
Function: enable_device_url(uuid)
Function: enable_local_mode(uuid)
Function: enable_lock_override(uuid)
Function: generate_device_key(uuid)
Function: generate_uuid()
Function: get(uuid)
Function: get_all()
Function: get_all_by_application(name)
Function: get_all_by_application_id(appid)
Function: get_application_name(uuid)
Function: get_by_name(name)
Function: get_dashboard_url(uuid)
Function: get_device_slug(device_type_name)
Function: get_device_url(uuid)
Function: get_display_name(device_type_slug)
Function: get_local_ip_address(uuid)
Function: get_local_mode_support(uuid)
Function: get_mac_address(uuid)
Function: get_manifest_by_application(app_name)
Function: get_manifest_by_slug(slug)
Function: get_metrics(uuid)
Function: get_name(uuid)
Function: get_os_update_status(uuid)
Function: get_status(uuid)
Function: get_supervisor_state(uuid)
Function: get_supervisor_target_state(uuid)
Function: get_supported_device_types()
Function: get_with_service_details(uuid, expand_release)
Function: grant_support_access(uuid, expiry_timestamp)
Function: has(uuid)
Function: has_device_url(uuid)
Function: has_lock_override(uuid)
Function: identify(uuid)
Function: is_in_local_mode(uuid)
Function: is_online(uuid)
Function: is_tracking_application_release(uuid)
Function: move(uuid, app_name)
Function: note(uuid, note)
Function: register(app_id, uuid)
Function: remove(uuid)
Function: rename(uuid, new_name)
Function: restart(uuid)
Function: revoke_support_access(uuid)
Function: set_custom_location(uuid, location)
Function: set_to_release(uuid, commit_id)
Function: set_to_release_by_id(uuid, release_id)
Function: start_os_update(uuid, target_os_version)
Function: track_application_release(uuid)
Function: unset_custom_location(uuid)
DeviceOs
Function: download(raw)
Function: download_unconfigured_image(device_type, version, raw)
Function: get_config(app_id, options)
Function: get_device_os_semver_with_variant(os_version, os_variant)
Function: get_supported_versions(device_type)
Function: is_architecture_compatible_with(os_architecture, application_architecture)
Function: parse_params()
EnvironmentVariable
ApplicationEnvVariable
Function: create(app_id, env_var_name, value)
Function: get_all(app_id)
Function: is_system_variable(variable)
Function: remove(var_id)
Function: update(var_id, value)
ServiceEnvVariable
Function: create(app_id, service_name, env_var_name, value)
Function: get_all_by_application(app_id)
Function: remove(var_id)
Function: update(var_id, value)
DeviceEnvVariable
Function: create(uuid, env_var_name, value)
Function: get_all(uuid)
Function: get_all_by_application(app_id)
Function: remove(var_id)
Function: update(var_id, value)
DeviceServiceEnvVariable
Function: create(uuid, service_name, env_var_name, value)
Function: get_all(uuid)
Function: get_all_by_application(app_id)
Function: remove(var_id)
Function: update(var_id, value)
Image
Function: get(id)
Function: get_log(id)
Organization
Function: create(name, handle)
Function: get(org_id)
Function: get_all()
Function: get_by_handle(handle)
Function: remove(org_id)
Release
Function: create_from_url(app_id, url, flatten_tarball)
Function: get(commit_or_id)
Function: get_all_by_application(app_id)
Function: get_latest_by_application(app_id)
Function: get_with_image_details(commit_or_id)
Service
Function: get_all_by_application(app_id)
Tag
DeviceTag
Function: get_all()
Function: get_all_by_application(app_id)
Function: get_all_by_device(uuid)
Function: remove(uuid, tag_key)
Function: set(uuid, tag_key, value)
ApplicationTag
Function: get_all()
Function: get_all_by_application(app_id)
Function: remove(app_id, tag_key)
Function: set(app_id, tag_key, value)
ReleaseTag
Function: get_all()
Function: get_all_by_application(app_id)
Function: get_all_by_release(commit_or_id)
Function: remove(commit_or_id, tag_key)
Function: set(commit_or_id, tag_key, value)
Key
Function: create(title, key)
Function: get(id)
Function: get_all()
Function: remove(id)
Supervisor
Function: blink(device_uuid, app_id)
Function: force_api_endpoint(endpoint)
Function: get_application_info(app_id, device_uuid)
Function: get_device_state(app_id, device_uuid)
Function: ping(device_uuid, app_id)
Function: purge(app_id, device_uuid)
Function: reboot(device_uuid, app_id, force)
Function: regenerate_supervisor_api_key(app_id, device_uuid)
Function: restart(app_id, device_uuid)
Function: restart_service(device_uuid, image_id)
Function: shutdown(device_uuid, app_id, force)
Function: start_application(app_id, device_uuid)
Function: start_service(device_uuid, image_id)
Function: stop_application(app_id, device_uuid)
Function: stop_service(device_uuid, image_id)
Function: update(device_uuid, app_id, force)
Auth
Function: authenticate()
Function: get_email()
Function: get_token()
Function: get_user_id()
Function: is_logged_in()
Function: log_out()
Function: login()
Function: login_with_token(token)
Function: register()
Function: who_am_i()
Logs
Function: history(uuid, count)
Function: subscribe(uuid, callback, error, count)
Function: unsubscribe(uuid)
Function: unsubscribe_all()
Settings
Function: get(key)
Function: get_all()
Function: has(key)
Function: remove(key)
Function: set(key, value)
TwoFactorAuth
Function: challenge(code)
Function: generate_code(secret)
Function: get_otpauth_secret()
Function: is_enabled()
Function: is_passed()
Last updated
Was this helpful?