Network#
- class ignis.services.network.NetworkService(*args: Any, **kwargs: Any)#
A Network service. Uses
NetworkManager
.
- class ignis.services.network.Wifi(client: gi.repository.NM.Client)#
The class for controlling Wi-Fi devices.
- signal new_device#
Emitted when a new Wi-FI device is added.
- Parameters:
device (
WifiDevice
) -- An instance of the device.
- gproperty devices: list[WifiDevice]#
read-only
A list of Wi-Fi devices.
- class ignis.services.network.Ethernet(client: gi.repository.NM.Client)#
The class for controlling Ethernet devices.
- signal new_device#
Emitted when a new Ethernet device is added.
- Parameters:
device (
EthernetDevice
) -- An instance of the device.
- gproperty devices: list[EthernetDevice]#
read-only
A list of Ethernet devices.
- class ignis.services.network.Vpn(client: gi.repository.NM.Client)#
The class for controlling VPN connections.
- signal new_connection#
Emitted when a new VPN connection is added.
- Parameters:
connection (
VpnConnection
) -- An instance of the VPN connection.
- signal new_active_connection#
Emitted when a VPN connection is activated.
- Parameters:
connection (
VpnConnection
) -- An instance of the newly activated VPN connection.
- gproperty connections: list[VpnConnection]#
read-only
A list of all VPN connections.
- gproperty active_connections: list[VpnConnection]#
read-only
A list of active VPN connections.
- class ignis.services.network.WifiDevice(device: gi.repository.NM.DeviceWifi, client: gi.repository.NM.Client)#
A Wifi device.
- signal removed#
Emitted when this Wi-Fi device is removed.
- signal new_access_point#
Emitted when a new access point is added.
- Parameters:
access_point (
WifiAccessPoint
) -- An instance of the access point.
- gproperty access_points: list[WifiAccessPoint]#
read-only
A list of access points (Wi-FI networks).
- gproperty ap: WifiAccessPoint#
read-only
The currently active access point.
- class ignis.services.network.EthernetDevice(device: gi.repository.NM.DeviceEthernet, client: gi.repository.NM.Client)#
An Ethernet device.
- signal removed#
Emitted when this Ethernet device is removed.
- class ignis.services.network.WifiAccessPoint(point: gi.repository.NM.AccessPoint, client: gi.repository.NM.Client, device: gi.repository.NM.DeviceWifi)#
A Wi-Fi access point (Wi-Fi network).
- signal removed#
Emitted when this access point is removed.
- gproperty point: gi.repository.NM.AccessPoint#
read-only
An instance of
NM.AccessPoint
.
- gproperty last_seen: int#
read-only
The timestamp for the last time the access point was found in scan results.
- gproperty icon_name: str#
read-only
The current icon name for the access point. Depends on signal strength and current connection status.
- gproperty security: Literal['WPA1', 'WPA2/WPA3'] | None#
read-only
The security protocol of the access point (
WPA1
,WPA2/WPA3
).
- gproperty psk: str | None#
read-write
The stored Pre-shared key (password) for the access point.
None
if there is no a saved psk for this access point.Warning
After setting this property, you have to manually call
commit_changes_async()
to save changes to the disk.
- gproperty is_connected: bool#
read-only
Whether the device is currently connected to this access point.
- async connect_to(password: str | None = None) gi.repository.NM.ActiveConnection #
Asynchronously connect to this access point.
- Return type:
ActiveConnection
- Args
password: Password to use. This has an effect only if the access point requires a password.
- async 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. This function is asynchronous.
- Return type:
- clear_secrets() None #
Clear a stored secret. This will reset security settings (PSK and security protocol). :rtype:
None
Warning
After calling this method, you have to manually call
commit_changes_async()
to save changes to the disk.
- class ignis.services.network.VpnConnection(connection: NM.Connection | NM.ActiveConnection, client: gi.repository.NM.Client)#
A VPN connection.
- signal removed#
Emitted when this VPN connection is removed.