Radix tree data structure for Python
py-radix is an implementation of a radix tree for Python, which
supports storage and lookups of IPv4 and IPv6 networks.
The radix tree (a.k.a Patricia tree) is the data structure most
commonly used for routing table lookups. It efficiently stores
network prefixes of varying lengths and allows fast lookups of
containing networks. py-radix's implementation is built solely
for networks (the data structure itself is more general).
py-radix is an implementation of a radix tree data structure for the storage
and retrieval of IPv4 and IPv6 network prefixes.
The radix tree is the data structure most commonly used for routing table
lookups. It efficiently stores network prefixes of varying lengths and
allows fast lookups of containing networks.
To install, use the standard Python distutils incantation:
python setup.py bui
- (djm) Implement pickle protocol via __reduce__ and __setstate__, inspired
by wrapper from Erik Curiel (ecuriel AT kefta.com)
- (djm) Crank version number to 0.5
- (djm) Make this compile on Python 2.4, which lacks Py_ssize_t
- (djm) fix for Windows platforms: WSAStartup was not called, resulting
in failures inside getaddrinfo. Report from harpreet.sawhney AT gmail.com
Fix bug(?) on Win32: getaddrinfo doesn't seem to parse IPv6 addresses
- Maybe Extend Radix methods to accept (network, mask) (contiguous masks only)
tree.search_all_containing(network) -> [ network, network ] (sorted by prefix)
(use search_best2 internally)
tree.search_containing(network) -> RadixNode or None
Find the prefix containing 'network'
The Python binding code is subject to this license:
* Copyright (c) 2004 Damien Miller <djm@min
Browse inside py-radix-0.5-6.el4.ppc.rpm
Results 1 - 1 of 1Search over 15 billion files
© 1997-2017 FileWatcher.com