ANN: pyroute2 (python netlink library) initial public release

Peter V. Saveliev peet at redhat.com
Tue May 7 21:46:05 CEST 2013


General description
===================

Started as python NETLINK_ROUTE library, pyroute2 provides simple 
netlink encoder/decoder. Families and messages supported by now:

* rtnetlink: addresses, links, neighbors, routes
* taskstats

More netlink families to support are planned.

Features
========

* pure-python, w/o any additional *.so or ctypes
* transactional database for rtnetlink family
   * interfaces as context managers
   * transaction review() / rollback() / commit()
   * automatic transaction rollback() on commit() exception
   * monitors IP stack for changes
* for old-school guys: old-style API ip.link('set', dev, param=…)
* netlink-over-SOCK_STREAM — with TLS/SSL client/server auth

IP stack monitoring allows not to fetch data from the system upon user's 
request, but keep it in sync all the time in the database, and on huge 
arrays of VLANs or VPN nics response even faster than C with ioctl() 
does — and still provide more info, 'cause through ioctl() not any data 
is available.

Goals
=====

The main goal is to provide simple (maybe even simplest) API for netlink 
usage. In the todo list are (beside of support for different netlink 
families) also userspace-to-userspace netlink transport, more auth 
mechanisms, e.g. SASL (in addition to TLS/SSL).

Links
=====

     home: https://github.com/svinota/pyroute2
     bugs: https://github.com/svinota/pyroute2/issues
     pypi: https://pypi.python.org/pypi/pyroute2
     docs: http://peet.spb.ru/pyroute2/

Some easy code samples: http://peet.spb.ru/pyroute2/modules.html

-- 
Peter V. Saveliev


More information about the Python-announce-list mailing list