-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
151 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
bin/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Rope | ||
.ropeproject | ||
|
||
# Django stuff: | ||
*.log | ||
*.pot | ||
|
||
# Sphinx documentation | ||
docs/_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
The Python binding code is subject to this license: | ||
The latest (post-2014) Python code is subject to this license: | ||
|
||
/* | ||
* Copyright (c) 2014 Michael J. Schultz <[email protected]> | ||
* | ||
* Permission to use, copy, modify, and distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
|
||
The original (pre-2014) Python binding code is subject to this license: | ||
|
||
/* | ||
* Copyright (c) 2004 Damien Miller <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
py-radix is an implementation of a radix tree data structure for the storage | ||
and retrieval of IPv4 and IPv6 network prefixes. | ||
py-radix | ||
======== | ||
|
||
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. | ||
py-radix implements the radix tree data structure for the storage and | ||
retrieval of IPv4 and IPv6 network prefixes. | ||
|
||
To install, use the standard Python distutils incantation: | ||
The radix tree is commonly used for routing table lookups. It efficiently | ||
stores network prefixes of varying lengths and allows fast lookups of | ||
containing networks. | ||
|
||
Installation | ||
------------ | ||
|
||
Installation is a breeze via pip: | ||
|
||
pip install py-radix | ||
|
||
Or with the standard Python distutils incantation: | ||
|
||
python setup.py build | ||
python setup.py install | ||
|
||
Regression tests are in the test.py file. | ||
|
||
py-radix is licensed under a ISC/BSD licence. The underlying radix tree | ||
implementation is taken (and modified) from MRTd and is subject to a 4-term | ||
BSD license. See the LICENSE file for details. | ||
Tests are in the `tests/` directory and can be run with `python setup.py test`. | ||
|
||
Please report bugs to Damien Miller <[email protected]>. Please check the TODO | ||
file first, in case your problem is something I already know about (please | ||
send patches!) | ||
Usage | ||
----- | ||
|
||
A simple example that demonstrates most of the features: | ||
|
||
|
@@ -90,4 +95,24 @@ A simple example that demonstrates most of the features: | |
print rnode.prefix | ||
|
||
|
||
$Id: README,v 1.12 2004/11/24 20:46:18 djm Exp $ | ||
License | ||
------- | ||
|
||
py-radix is licensed under a ISC/BSD licence. The underlying radix tree | ||
implementation is taken (and modified) from MRTd and is subject to a 4-term | ||
BSD license. See the LICENSE file for details. | ||
|
||
Contributing | ||
------------ | ||
|
||
Please report bugs via GitHub at https://github.com/mjschultz/py-radix/issues. | ||
Code changes can be contributed through a pull request on GitHub or emailed | ||
directly to me <[email protected]>. | ||
|
||
The main portions of the directory tree are as follows: | ||
|
||
. | ||
├── radix/ # Pure Python code | ||
├── lib/ # C extension code (compatible with pure python code) | ||
├── tests/ # Tests (regression and unit) | ||
└── setup.py # Standard setup.py for installation/testing/etc. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
try: | ||
from _radix import * | ||
except Exception as e: | ||
print 'C extension not found' | ||
print e | ||
|
||
__version__ = '0.6.0' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.