Skip to main content

Pretty-print IPy's IPSets

Project description

Pretty-print IPy’s IPSets in a human-readable fashion.

https://coveralls.io/repos/djmitche/prettyip/badge.svg?branch=master https://travis-ci.org/djmitche/prettyip.svg?branch=master

Compatibility

Everywhere IPy runs, so does this – CPython-2.6 through 3.4.

Usage

Explicitly:

from IPy import IPSet, IP
import prettyip

my_ipset = IPSet([IP('10.0.0.0/8')]) - IPSet([IP('10.0.1.2')])
print prettyip(my_ipset)

Or, monkey-patch IPy:

import prettyip

prettyip.patch_ipy()

my_ipset = IPSet([IP('10.0.0.0/8')]) - IPSet([IP('10.0.1.2')])
print my_ipset

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

prettyip-1.0.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

prettyip-1.0.1-py2.py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 2 Python 3

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