Skip to main content

Simple python interface to Network Manager CLI

Project description

*************************
PyNmcli
*************************

.. image:: https://travis-ci.org/fbarresi/PyNmcli.svg?branch=master
:alt: Travis CI build status

Simple python interface to Network Manager CLI

PyNmcli provides a easy to use python (2.7+ or 3+) interface to Network Manager CLI.
Official documentation of nmcli under: https://developer.gnome.org/NetworkManager/stable/nmcli.html

Dependencies
========

This project has no dependencies and works with python 2.7+ (python 3 as well)

This package directly uses ``Network-Manager``.

Your can install it running the following command from shell: ::

sudo apt-get install network-manager

Installation
========

You may install this package in two ways:

- Compile from code ::

git clone https://github.com/fbarresi/PyNmcli.git
cd PyNmcli
python setup.py install

- Pypi ::

pip install pynmcli

Usage
========

Just import the package::

import pynmcli

and call Network Manager function just like: ::

result = pynmcli.NetworkManager('--version').execute()

or ::

result = pynmcli.NetworkManager.Device().wifi('list').execute()

you can also use some built-in help methods in order to convert output tables in more handy python dictionaries: ::

wifi_dict = pynmcli.get_data(pynmcli.NetworkManager.Device().wifi().execute())

Contribute
========

Whould you like to contribute to this project? YES, PLEASE!

Just fork this repository and submit your pull request.

Change log
========

- Version 1.0.4 - Fixed localization issues in the use of nmcli

- Version 1.0.3 - Enhanced usability

- Version 1.0.2 - Added utils for converting cli outputs into python dicts

- Version 1.0.1 - First working release

- Version 1.0.0 - Test release

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

pynmcli-1.0.5.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file pynmcli-1.0.5.tar.gz.

File metadata

  • Download URL: pynmcli-1.0.5.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6

File hashes

Hashes for pynmcli-1.0.5.tar.gz
Algorithm Hash digest
SHA256 29cf7a48e482dffcfc006f6b8fae885bf68dc4bb00cd07a277a61b7eeeb28daa
MD5 b483437098a38425867e333dbdebb7c3
BLAKE2b-256 086cb7425e04f70f0192367cef752678afcbb2cd99e945b2b3c3b532849b613f

See more details on using hashes here.

Supported by

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