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

Uploaded Source

File details

Details for the file py-ip-command-0.0.4.tar.gz.

File metadata

  • Download URL: py-ip-command-0.0.4.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for py-ip-command-0.0.4.tar.gz
Algorithm Hash digest
SHA256 dd0a3f2582b5faf3095d02a85e28a37cc64ef9a3787822a8aea5dbab78db5a26
MD5 9894358c658568576829555362c402a2
BLAKE2b-256 9082b5e5143896f7c89e72eb36811bf8c28ad581f961c69bb02d901f96ee9973

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