Skip to main content

A wrapper around the linux `ip` command

Project description

py-ip-command

Wrapping the Linux ip command in Python.

Find me on pypi: https://pypi.org/project/py-ip-command/

on GitHub: https://github.com/Corvan/py-ip-command

or install me:

pip install py-ip-command
pipenv install py-ip-command

Note

This is still work in progess, but you can already use it. Help is very welcome!

Usage

At the moment only two commands of ip are implemented.

Just use

from ip_command.ip import IP

and then you can issue commands like

ip addr show

with

IP.addr.show()

or

ip neigh show

with

IP.neigh.show()

The return of both is

  • An object oriented representation of the data reurned by both commands
  • a dict (addr) or a list of dicts (neigh) consisting of all the information the commands return but split into single elements, if you pass as_dict=True to show() or simply call show(True)

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

py-ip-command-0.0.4.tar.gz (3.7 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