Skip to main content

View and control network interfaces

Project description

===========================================
Python package to access network interfaces
===========================================

General information:
Pyiface is a package that exposes the network interfaces
of the operating system in a easy to use and transparent way
Typical usage looks like this::

#!/usr/bin/env python
import pyiface

#Get all available network interfaces
allIfaces = pyiface.getIfaces()
for iface in allIfaces:
print iface

#Get a specific interface by name
eth0 = pyiface.Interface('eth0')

#view eth0 info
print eth0

#bring eth0 up
eth0.flags = eth0.flags | IFF_UP

#set ipv4 address of the interface
eth0.addr = (socket.AF_INET, '1.2.3.4')

#set ipv6 address of the interface
eth0.addr = (socket.AF_INET6, '2001:0db8:85a3:0000:0000:8a2e:0370:7334')

Install:
To install the package simply call setup.py with the install option.

Links:
For more information goto my `blogspot <http://python-a-day.blogspot.com/>`_.
Or browse the `github <https://github.com/bat-serjo/PyIface>`_ repository.

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

pyiface-0.0.1.tar.gz (17.6 kB view details)

Uploaded Source

File details

Details for the file pyiface-0.0.1.tar.gz.

File metadata

  • Download URL: pyiface-0.0.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyiface-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ec7735c268eeb93099aeb3636056a0ed365cbffb154749d882f6c3b3dc3266a4
MD5 cf70233387bfd51dfe4153dec4571e80
BLAKE2b-256 9fd512e148c4a189dbe37d7e6bb4f09e51f39d2e5d8c5f77df16650e6590c274

See more details on using hashes here.

Supported by

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