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.

Source Distribution

python-nmcli-0.1.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page