Network#

class ignis.services.network.NetworkService(*args: Any, **kwargs: Any)#

A Network service. Uses NetworkManager.

Properties:
  • wifi (Wifi, read-only): The Wi-Fi object.

  • ethernet (Ethernet, read-only): The Ethernet device object.

class ignis.services.network.Wifi(*args: Any, **kwargs: Any)#

Class for controlling Wi-Fi devices.

Properties:
  • devices (WifiDevice, read-only): A list of Wi-Fi devices.

  • is_connected (bool, read-only): Whether at least one Wi-Fi device is connected to the network.

  • icon_name (str, read-only): The icon name of the first device in the list.

  • enabled (bool, read-only): Whether Wi-Fi is enabled.

class ignis.services.network.Ethernet(*args: Any, **kwargs: Any)#

Class for controlling Ethernet devices.

Properties:
  • devices (EthernetDevice, read-only): A list of Ethernet devices.

  • is_connected (bool, read-only): Whether at least one Ethernet device is connected to the network.

  • icon_name (str, read-only): The general icon name for all devices, depends on is_connected property.

class ignis.services.network.WifiDevice(*args: Any, **kwargs: Any)#

A Wifi device.

Properties:
  • access_points (list[WifiAccessPoint], read-only): A list of access points (Wi-FI networks).

  • ap (WifiAccessPoint, read-only): The currently active access point.

  • state (str | None, read-only): The current state of the device or None if unknown.

scan() None#

Scan for Wi-Fi networks.

class ignis.services.network.EthernetDevice(*args: Any, **kwargs: Any)#

Ethernet device.

Properties:
  • carrier (bool, read-only): Whether the device has a carrier.

  • perm_hw_address (str, read-only): The permanent hardware (MAC) address of the device.

  • speed (int, read-only): The speed of the device.

  • state (str | None, read-only): Current state of the device or None if unknown.

  • is_connected (bool, read-only): Whether the device is connected to the network.

  • name (str | None, read-only): The name of the connection or None if unknown.

connect_to() None#

Connect this Ethernet device to the network.

disconnect_from() None#

Disconnect this Ethernet device from the network.

class ignis.services.network.WifiAccessPoint(*args: Any, **kwargs: Any)#

A Wi-Fi access point (Wi-Fi network).

Properties:
  • point (NM.AccessPoint, read-only): An instance of NM.AccessPoint. You typically shouldn't use this property.

  • bandwidth (int, read-only): The channel bandwidth announced by the access point, in MHz.

  • bssid (str, read-only): The BSSID of the access point.

  • frequency (int, read-only): The frequency of the access point, in MHz.

  • last_seen (int, read-only): The timestamp for the last time the access point was found in scan results.

  • max_bitrate (int, read-only): The maximum bit rate of the access point, in kbit/s.

  • ssid (str | None, read-only): The SSID of the access point, or None if it is not known.

  • strength (int, read-only): The current signal strength of the access point, from 0 to 100.

  • icon_name (str, read-only): The current icon name for the access point. Depends on signal strength and current connection status.

  • requires_password (bool, read-only): Whether the access point requires a password to connect.

  • is_connected (bool, read-only): Whether the device is currently connected to this access point.

Raises:

NetworkManagerNotFoundError -- If Network Manager is not found.

connect_to(password: str | None = None) None#

Connect to this access point.

Args

password (str, optional): Password to use. This has an effect only if the access point requires a password.

connect_to_graphical() None#

Display a graphical dialog to connect to the access point. The dialog will be shown only if the access point requires a password.

class ignis.services.network.ActiveAccessPoint(*args: Any, **kwargs: Any)#