11python-iptools
22==============
33
4- The [ iptools] [ ] package is a collection of utilities for dealing with IPv4
4+ The [ iptools] [ ] package is a collection of utilities for dealing with IP
55addresses.
66
77[ ![ Build Status] [ ci-status ]] [ ci-home ]
88
9- A few useful functions and objects for manipulating IPv4 addresses in python.
10- This was all inspired by a desire to be able to use CIDR address notation to
11- designate ` INTERNAL_IPS ` in a [ Django] [ ] project's settings file.
12-
13- Functions
14- ---------
15-
16- * ` validate_ip ` : Validate a dotted quad IPv4 address.
17- * ` ip2long ` : Convert a dotted quad IPv4 address to a network byte order 32-bit
18- integer.
19- * ` long2ip ` : Convert a network byte order 32-bit integer to a dotted quad IPv4
20- address.
21- * ` validate_cidr ` : Validate a CIDR notation IPv4 address.
22- * ` cidr2block ` : Convert a CIDR notation IPv4 address into a tuple containing
23- network block start and end addresses.
24-
25- Objects
26- -------
27-
28- * ` IpRange ` : Range of IPv4 addresses providing ` in ` and iteration.
29- * ` IpRangeList ` : List of IpRange objects providing ` in ` and iteration.
9+ A few useful functions and objects for manipulating IPv4 and IPv6 addresses in
10+ python. The project was inspired by a desire to be able to use CIDR address
11+ notation to designate ` INTERNAL_IPS ` in a [ Django] [ ] project's settings file.
3012
3113Using with Django
3214-----------------
@@ -64,12 +46,15 @@ which python calls when the `in` or `not in` operators are used.
6446 '127.0.0.1', # single ip
6547 '192.168/16', # CIDR network block
6648 ('10.0.0.1', '10.0.0.19'), # arbitrary inclusive range
49+ '::1', # single IPv6 address
50+ 'fe80::/10', # IPv6 CIDR block
51+ '::ffff:172.16.0.2' # IPv4-mapped IPv6 address
6752 )
6853
69- Additional Documentations
70- -------------------------
54+ Documentation
55+ -------------
7156
72- Pydoc documantation available at [ Read the Docs] [ ] .
57+ Full pydoc documentation is available at [ Read the Docs] [ ] .
7358
7459Local documentation can be built using [ Sphinx] [ ] :
7560
@@ -79,10 +64,10 @@ Local documentation can be built using [Sphinx][]:
7964Python Version Compatibility
8065----------------------------
8166
82- [ Travis CI] [ ci-home ] automatically runs tests against python 2.5, 2.6, 2.7, 3.2, 3.3 and pypy on 32-bit Ubuntu Linux 11.10 .
67+ [ Travis CI] [ ci-home ] automatically runs tests against python 2.5, 2.6, 2.7, 3.2, 3.3 and pypy.
8368
84- Installing
85- ----------
69+ Installation
70+ ------------
8671
8772Install the latest stable version using pip:
8873
@@ -98,6 +83,13 @@ Install the latest development version:
9883 cd python-iptools
9984 python setup.py install
10085
86+ Contributions
87+ -------------
88+ Bug reports, feature requests and pull requests are accepted. Preference is
89+ given to issues with well-defined acceptance criteria and/or unit tests.
90+
91+ This project was originally hosted on [ Google Code] [ ] .
92+
10193---
10294[ iptools ] : http://pypi.python.org/pypi/iptools
10395[ ci-status ] : https://secure.travis-ci.org/bd808/python-iptools.png
@@ -107,3 +99,4 @@ Install the latest development version:
10799[ INTERNAL_IPS ] : http://docs.djangoproject.com/en/dev/ref/settings/#internal-ips
108100[ Read the Docs ] : http://python-iptools.readthedocs.org/
109101[ Sphinx ] : http://sphinx.pocoo.org/
102+ [ Google Code ] : https://code.google.com/p/python-iptools/
0 commit comments