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 details)

Uploaded Source

File details

Details for the file python-nmcli-0.1.1.tar.gz.

File metadata

File hashes

Hashes for python-nmcli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7e7b58aed4105c8f383836c1907c484583e71c3e257000a3463b80a4a659322e
MD5 1164cccc01afa0896865513779011fae
BLAKE2b-256 04144d8c53ec2bca54087f0c44a942a3ccfab9fd9217a9559f8a1cbf38d59ef7

See more details on using hashes here.

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