Skip to main content

Python wrapper around nmcli (Linux NetworkManager CLI)

Project description

Just a simple wrapper around nmcli.

>>> import nmcli
>>> dir(nmcli)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'con', 'dev', 'nm', 'nmcli', 'shell']
>>> nmcli.nm.status()
[{'WIFI': 'enabled', 'STATE': 'connected', 'WWAN': 'enabled', 'WWAN-HARDWARE': 'enabled', 'RUNNING': 'running', 'WIFI-HARDWARE': 'enabled'}]
>>> nmcli.nm.enable(True)
>>> nmcli.con.list()
[{'TIMESTAMP-REAL': 'never', 'TYPE': 'vpn', 'NAME': 'starbuckswifi', 'UUID': 'a8a95280-f938-46b9-a58a-d71d71c6d37e'}, {'TIMESTAMP-REAL': 'never', 'TYPE': 'vpn', 'NAME': 'marriot', 'UUID': '56e66de7-7902-42b4-bf6d-2a4a36d051d1'....
>>> nmcli.con.list(id="marriot")
[{'dhcp-send-hostname': 'yes....

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-nmcli, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size python-nmcli-0.1.1.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page