juno.device

Device information and haptic feedback.

class juno.device.DeviceInfo(model, name, system_name, system_version, is_pad)

Bases: object

Basic metadata reported by the active iOS device.

Parameters:
class juno.device.ScreenSize(width, height, scale)

Bases: NamedTuple

Screen dimensions in points and pixel scale.

Parameters:
width: float

Alias for field number 0

height: float

Alias for field number 1

scale: float

Alias for field number 2

juno.device.info()

Return basic metadata for the current device.

Returns:

A DeviceInfo payload describing model, name, and system version.

Return type:

DeviceInfo

juno.device.screen_size()

Return screen dimensions in points and pixel scale.

Returns:

A ScreenSize tuple with width, height, and scale.

Return type:

ScreenSize

juno.device.battery_level()

Return normalized battery level.

Returns:

Value in [0.0, 1.0] when available, or -1.0 when unavailable.

Return type:

float

juno.device.is_dark_mode()

Return whether the current interface style is dark.

Returns:

True when dark mode is active, otherwise False.

Return type:

bool

juno.device.locale()

Return the current locale identifier.

Returns:

Locale identifier string such as "en_US".

Return type:

str

juno.device.haptic_impact(style='medium')

Trigger an impact haptic.

Parameters:

style (str) – Impact style, one of light, medium, heavy, soft, or rigid.

Raises:
Return type:

None

juno.device.haptic_notification(type='success')

Trigger a notification haptic.

Parameters:

type (str) – Notification type, one of success, warning, or error.

Raises:
Return type:

None

juno.device.haptic_selection()

Trigger a selection-change haptic.

Return type:

None