Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fbarresi/pynmcli
Simple python interface to Network Manager CLI
https://github.com/fbarresi/pynmcli
debian networking networkmanager python ubuntu
Last synced: 18 days ago
JSON representation
Simple python interface to Network Manager CLI
- Host: GitHub
- URL: https://github.com/fbarresi/pynmcli
- Owner: fbarresi
- License: mit
- Created: 2018-01-01T19:17:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-12T19:44:55.000Z (almost 6 years ago)
- Last Synced: 2024-10-09T05:54:03.336Z (28 days ago)
- Topics: debian, networking, networkmanager, python, ubuntu
- Language: Python
- Size: 35.2 KB
- Stars: 6
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
*************************
PyNmcli
*************************.. image:: https://travis-ci.org/fbarresi/PyNmcli.svg?branch=master
:alt: Travis CI build statusSimple 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.htmlDependencies
========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.5 - Fixed table-header handling- 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