Skip to main content

Fast IPv4 and IPv6 prefix aggregator written in Python.

Project description


Fast IPv4 and IPv6 prefix aggregator written in Pyrhon.

Gets a list of unsorted IPv4 or IPv6 prefixes from argument or SDTIN and returns a sorted list of aggregates to STDOUT Errors go to STDERR.

CLI Syntax for executable

usage: aggregate-prefixes [-h] [--max-length [LENGTH]] [--verbose] [--version]

Aggregates IPv4 or IPv6 prefixes from file or STDIN

positional arguments:
  prefixes              Unsorted list of IPv4 or IPv6 prefixes. Use '-' for

optional arguments:
  -h, --help            show this help message and exit
  --max-length [LENGTH], -m [LENGTH]
                        Discard longer prefixes prior to processing
  --verbose, -v         Display verbose information about the optimisations
  --version, -V         show program's version number and exit

Usage as module

$ python
Python 2.7.14+ (default, Apr  2 2018, 04:16:25) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from aggregate_prefixes.aggregate_prefixes import aggregate_prefixes
>>> list(aggregate_prefixes(['', '', '']))
['', '']

Python compatibility

Tested with:

  • Python 2.7.15
  • Python 3.6.5

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aggregate-prefixes, version 0.5
Filename, size File type Python version Upload date Hashes
Filename, size aggregate_prefixes-0.5-py2.7.egg (10.2 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size aggregate_prefixes-0.5.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page