Commit 5ab11d2a by William Tisäter

Add ASN lookup to readme

parent 504b0f4d
...@@ -23,6 +23,7 @@ You can easily install pygeoip with setuptools: ...@@ -23,6 +23,7 @@ You can easily install pygeoip with setuptools:
* City * City
* Organization * Organization
* ISP * ISP
* ASN
## Quick Documentation ## ## Quick Documentation ##
...@@ -77,4 +78,10 @@ Create your GeoIP instance with appropriate access flag. `STANDARD` reads data f ...@@ -77,4 +78,10 @@ Create your GeoIP instance with appropriate access flag. `STANDARD` reads data f
>>> gi.org_by_name('cnn.com') >>> gi.org_by_name('cnn.com')
'Turner Broadcasting System' 'Turner Broadcasting System'
### ASN lookup ###
>>> gi = pygeoip.GeoIP('/path/to/GeoIPASNum.dat')
>>> gi.org_by_name('cnn.com')
'AS5662 Turner Broadcasting'
For more information, [check out the full API documentation](http://packages.python.org/pygeoip). For more information, [check out the full API documentation](http://packages.python.org/pygeoip).
pygeoip pygeoip-module.html pygeoip pygeoip-module.html
pygeoip.ENCODING pygeoip-module.html#ENCODING
pygeoip.time_zone_by_country_and_region pygeoip.timezone-module.html#time_zone_by_country_and_region pygeoip.time_zone_by_country_and_region pygeoip.timezone-module.html#time_zone_by_country_and_region
pygeoip.__package__ pygeoip-module.html#__package__ pygeoip.__package__ pygeoip-module.html#__package__
pygeoip.STANDARD pygeoip-module.html#STANDARD pygeoip.STANDARD pygeoip-module.html#STANDARD
...@@ -6,6 +7,7 @@ pygeoip.MMAP_CACHE pygeoip-module.html#MMAP_CACHE ...@@ -6,6 +7,7 @@ pygeoip.MMAP_CACHE pygeoip-module.html#MMAP_CACHE
pygeoip.MEMORY_CACHE pygeoip-module.html#MEMORY_CACHE pygeoip.MEMORY_CACHE pygeoip-module.html#MEMORY_CACHE
pygeoip.const pygeoip.const-module.html pygeoip.const pygeoip.const-module.html
pygeoip.const.GEOIP_STANDARD pygeoip.const-module.html#GEOIP_STANDARD pygeoip.const.GEOIP_STANDARD pygeoip.const-module.html#GEOIP_STANDARD
pygeoip.const.ENCODING pygeoip.const-module.html#ENCODING
pygeoip.const.COUNTRY_CODES3 pygeoip.const-module.html#COUNTRY_CODES3 pygeoip.const.COUNTRY_CODES3 pygeoip.const-module.html#COUNTRY_CODES3
pygeoip.const.PY3 pygeoip.const-module.html#PY3 pygeoip.const.PY3 pygeoip.const-module.html#PY3
pygeoip.const.IPV6_EDITIONS pygeoip.const-module.html#IPV6_EDITIONS pygeoip.const.IPV6_EDITIONS pygeoip.const-module.html#IPV6_EDITIONS
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -256,7 +256,7 @@ page was last updated. </p> ...@@ -256,7 +256,7 @@ page was last updated. </p>
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
B B
<a href="#C">C</a> <a href="#C">C</a>
<a href="#D">D</a> <a href="#D">D</a>
E <a href="#E">E</a>
<a href="#F">F</a> <a href="#F">F</a>
<a href="#G">G</a> <a href="#G">G</a>
H H
...@@ -159,6 +159,19 @@ ...@@ -159,6 +159,19 @@
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr> <tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table> </table>
</td></tr> </td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="E">E</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="pygeoip-module.html#ENCODING">ENCODING</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip-module.html">pygeoip</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#ENCODING">ENCODING</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td> <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td>
<td valign="top"> <td valign="top">
<table class="link-index" width="100%" border="1"> <table class="link-index" width="100%" border="1">
...@@ -459,7 +472,7 @@ ...@@ -459,7 +472,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
<ul class="nomargin-top"> <ul class="nomargin-top">
<li> <strong class="uidlink"><a href="pygeoip-module.html">pygeoip</a></strong>: <em class="summary">Pure Python GeoIP API</em> <li> <strong class="uidlink"><a href="pygeoip-module.html">pygeoip</a></strong>: <em class="summary">Pure Python GeoIP API</em>
<ul> <ul>
<li> <strong class="uidlink"><a href="pygeoip.const-module.html">pygeoip.const</a></strong>: <em class="summary">Constants needed for parsing binary GeoIP databases.</em> </li> <li> <strong class="uidlink"><a href="pygeoip.const-module.html">pygeoip.const</a></strong>: <em class="summary">Constants needed for the binary parser.</em> </li>
<li> <strong class="uidlink"><a href="pygeoip.timezone-module.html">pygeoip.timezone</a></strong> </li> <li> <strong class="uidlink"><a href="pygeoip.timezone-module.html">pygeoip.timezone</a></strong>: <em class="summary">Time zone functions.</em> </li>
<li> <strong class="uidlink"><a href="pygeoip.util-module.html">pygeoip.util</a></strong>: <em class="summary">Misc.</em> </li> <li> <strong class="uidlink"><a href="pygeoip.util-module.html">pygeoip.util</a></strong>: <em class="summary">Utility functions.</em> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -61,24 +61,14 @@ ...@@ -61,24 +61,14 @@
<!-- ==================== PACKAGE DESCRIPTION ==================== --> <!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package pygeoip</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip-pysrc.html">source&nbsp;code</a></span></p> <h1 class="epydoc">Package pygeoip</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip-pysrc.html">source&nbsp;code</a></span></p>
<p>Pure Python GeoIP API</p> <p>Pure Python GeoIP API</p>
<p>The API is based on <a href="http://www.maxmind.com/app/python" <p>The API is based on MaxMind's C-based Python API, but the code itself
target="_top">MaxMind's C-based Python API</a>, but the code itself is is ported from the Pure PHP GeoIP API by Jim Winstead and Hans
based on the <a href="http://pear.php.net/package/Net_GeoIP/" Lellelid.</p>
target="_top">pure PHP5 API</a> by Jim Winstead and Hans Lellelid.</p>
<p>It is mostly a drop-in replacement, except the <code>new</code> and
<code>open</code> methods are gone. You should instantiate the <a
href="pygeoip.GeoIP-class.html" class="link">GeoIP</a> class
yourself:</p>
<p><code>gi = GeoIP('/path/to/GeoIP.dat',
pygeoip.MEMORY_CACHE)</code></p>
<hr /> <hr />
<div class="fields"> <dl><dt>Authors:</dt> <div class="fields"> <p><strong>Author:</strong>
<dd> Jennifer Ennis &lt;zaylea@gmail.com&gt;
Jennifer Ennis &lt;zaylea at gmail dot com&gt;, </p>
William Tis&#228;ter &lt;william@defunct.cc&gt;
</dd>
</dl>
<p><strong>License:</strong> <p><strong>License:</strong>
Copyright(C) 2004 MaxMind LLC Copyright(C) 2004 MaxMind LLC
<p>This program is free software: you can redistribute it and/or <p>This program is free software: you can redistribute it and/or
...@@ -112,9 +102,9 @@ ...@@ -112,9 +102,9 @@
</tr> </tr>
<tr><td class="summary"> <tr><td class="summary">
<ul class="nomargin"> <ul class="nomargin">
<li> <strong class="uidlink"><a href="pygeoip.const-module.html">pygeoip.const</a></strong>: <em class="summary">Constants needed for parsing binary GeoIP databases.</em> </li> <li> <strong class="uidlink"><a href="pygeoip.const-module.html">pygeoip.const</a></strong>: <em class="summary">Constants needed for the binary parser.</em> </li>
<li> <strong class="uidlink"><a href="pygeoip.timezone-module.html">pygeoip.timezone</a></strong> </li> <li> <strong class="uidlink"><a href="pygeoip.timezone-module.html">pygeoip.timezone</a></strong>: <em class="summary">Time zone functions.</em> </li>
<li> <strong class="uidlink"><a href="pygeoip.util-module.html">pygeoip.util</a></strong>: <em class="summary">Misc.</em> </li> <li> <strong class="uidlink"><a href="pygeoip.util-module.html">pygeoip.util</a></strong>: <em class="summary">Utility functions.</em> </li>
</ul></td></tr> </ul></td></tr>
</table> </table>
...@@ -186,6 +176,13 @@ ...@@ -186,6 +176,13 @@
<td width="15%" align="right" valign="top" class="summary"> <td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span> <span class="summary-type">&nbsp;</span>
</td><td class="summary"> </td><td class="summary">
<a name="STANDARD"></a><span class="summary-name">STANDARD</span> = <code title="0">0</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MMAP_CACHE"></a><span class="summary-name">MMAP_CACHE</span> = <code title="8">8</code> <a name="MMAP_CACHE"></a><span class="summary-name">MMAP_CACHE</span> = <code title="8">8</code>
</td> </td>
</tr> </tr>
...@@ -200,7 +197,7 @@ ...@@ -200,7 +197,7 @@
<td width="15%" align="right" valign="top" class="summary"> <td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span> <span class="summary-type">&nbsp;</span>
</td><td class="summary"> </td><td class="summary">
<a name="STANDARD"></a><span class="summary-name">STANDARD</span> = <code title="0">0</code> <a name="ENCODING"></a><span class="summary-name">ENCODING</span> = <code title="'iso-8859-1'"><code class="variable-quote">'</code><code class="variable-string">iso-8859-1</code><code class="variable-quote">'</code></code>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -242,7 +239,7 @@ ...@@ -242,7 +239,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -563,9 +563,9 @@ object --+ ...@@ -563,9 +563,9 @@ object --+
used and setup segment sizes and start points that will be used by the used and setup segment sizes and start points that will be used by the
seek*() methods later.</p> seek*() methods later.</p>
<p>Supported databases:</p> <p>Supported databases:</p>
<p>* COUNTRY_EDITION * REGION_EDITION_REV0 * REGION_EDITION_REV1 * <p>* COUNTRY_EDITION * COUNTRY_EDITION_V6 * REGION_EDITION_REV0 *
CITY_EDITION_REV0 * CITY_EDITION_REV1 * ORG_EDITION * ISP_EDITION * REGION_EDITION_REV1 * CITY_EDITION_REV0 * CITY_EDITION_REV1 * ORG_EDITION
ASNUM_EDITION</p> * ISP_EDITION * ASNUM_EDITION</p>
<dl class="fields"> <dl class="fields">
</dl> </dl>
</td></tr></table> </td></tr></table>
...@@ -1065,7 +1065,7 @@ object --+ ...@@ -1065,7 +1065,7 @@ object --+
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -167,7 +167,7 @@ object --+ ...@@ -167,7 +167,7 @@ object --+
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -177,7 +177,7 @@ exceptions.BaseException --+ ...@@ -177,7 +177,7 @@ exceptions.BaseException --+
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -337,7 +337,7 @@ object --+ ...@@ -337,7 +337,7 @@ object --+
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -61,12 +61,12 @@ ...@@ -61,12 +61,12 @@
</table> </table>
<!-- ==================== MODULE DESCRIPTION ==================== --> <!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module const</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip.const-pysrc.html">source&nbsp;code</a></span></p> <h1 class="epydoc">Module const</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip.const-pysrc.html">source&nbsp;code</a></span></p>
<p>Constants needed for parsing binary GeoIP databases. It is part of the <p>Constants needed for the binary parser. Part of the pygeoip
pygeoip package.</p> package.</p>
<hr /> <hr />
<div class="fields"> <p><strong>Author:</strong> <div class="fields"> <p><strong>Author:</strong>
Jennifer Ennis &lt;zaylea at gmail dot com&gt; Jennifer Ennis &lt;zaylea@gmail.com&gt;
</p> </p>
<p><strong>License:</strong> <p><strong>License:</strong>
Copyright(C) 2004 MaxMind LLC Copyright(C) 2004 MaxMind LLC
...@@ -422,6 +422,13 @@ ...@@ -422,6 +422,13 @@
<td width="15%" align="right" valign="top" class="summary"> <td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span> <span class="summary-type">&nbsp;</span>
</td><td class="summary"> </td><td class="summary">
<a name="ENCODING"></a><span class="summary-name">ENCODING</span> = <code title="'iso-8859-1'"><code class="variable-quote">'</code><code class="variable-string">iso-8859-1</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'pygeoip'"><code class="variable-quote">'</code><code class="variable-string">pygeoip</code><code class="variable-quote">'</code></code> <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'pygeoip'"><code class="variable-quote">'</code><code class="variable-string">pygeoip</code><code class="variable-quote">'</code></code>
</td> </td>
</tr> </tr>
...@@ -580,7 +587,7 @@ ...@@ -580,7 +587,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -61,7 +61,27 @@ ...@@ -61,7 +61,27 @@
</table> </table>
<!-- ==================== MODULE DESCRIPTION ==================== --> <!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module timezone</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip.timezone-pysrc.html">source&nbsp;code</a></span></p> <h1 class="epydoc">Module timezone</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip.timezone-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== FUNCTIONS ==================== --> <p>Time zone functions. Part of the pygeoip package.</p>
<hr />
<div class="fields"> <p><strong>Author:</strong>
Jennifer Ennis &lt;zaylea@gmail.com&gt;
</p>
<p><strong>License:</strong>
Copyright(C) 2004 MaxMind LLC
<p>This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.</p>
<p>You should have received a copy of the GNU Lesser General Public
License along with this program. If not, see
&lt;http://www.gnu.org/licenses/lgpl.txt&gt;.</p>
</p>
</div><!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a> <a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3" <table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white"> cellspacing="0" width="100%" bgcolor="white">
...@@ -212,7 +232,7 @@ ...@@ -212,7 +232,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
</table> </table>
<!-- ==================== MODULE DESCRIPTION ==================== --> <!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module util</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip.util-pysrc.html">source&nbsp;code</a></span></p> <h1 class="epydoc">Module util</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip.util-pysrc.html">source&nbsp;code</a></span></p>
<p>Misc. utility functions. It is part of the pygeoip package.</p> <p>Utility functions. Part of the pygeoip package.</p>
<hr /> <hr />
<div class="fields"> <p><strong>Author:</strong> <div class="fields"> <p><strong>Author:</strong>
Jennifer Ennis &lt;zaylea at gmail dot com&gt; Jennifer Ennis &lt;zaylea@gmail.com&gt;
</p> </p>
<p><strong>License:</strong> <p><strong>License:</strong>
Copyright(C) 2004 MaxMind LLC Copyright(C) 2004 MaxMind LLC
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%%"> <table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr> <tr>
<td align="left" class="footer"> <td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Sep 29 02:57:38 2012 Generated by Epydoc 3.0.1 on Sun Sep 30 13:48:03 2012
</td> </td>
<td align="right" class="footer"> <td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net" <a target="mainFrame" href="http://epydoc.sourceforge.net"
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
>pygeoip.util.ip2long</a><br /> <a target="mainFrame" href="pygeoip.util-module.html#ip2long_v4" >pygeoip.util.ip2long</a><br /> <a target="mainFrame" href="pygeoip.util-module.html#ip2long_v4"
>pygeoip.util.ip2long_v4</a><br /> <a target="mainFrame" href="pygeoip.util-module.html#ip2long_v6" >pygeoip.util.ip2long_v4</a><br /> <a target="mainFrame" href="pygeoip.util-module.html#ip2long_v6"
>pygeoip.util.ip2long_v6</a><br /> <h2 class="toc">All Variables</h2> >pygeoip.util.ip2long_v6</a><br /> <h2 class="toc">All Variables</h2>
<a target="mainFrame" href="pygeoip-module.html#MEMORY_CACHE" <a target="mainFrame" href="pygeoip-module.html#ENCODING"
>pygeoip.ENCODING</a><br /> <a target="mainFrame" href="pygeoip-module.html#MEMORY_CACHE"
>pygeoip.MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#MMAP_CACHE" >pygeoip.MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#MMAP_CACHE"
>pygeoip.MMAP_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#STANDARD" >pygeoip.MMAP_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#STANDARD"
>pygeoip.STANDARD</a><br /> <a target="mainFrame" href="pygeoip-module.html#__package__" >pygeoip.STANDARD</a><br /> <a target="mainFrame" href="pygeoip-module.html#__package__"
...@@ -40,7 +41,8 @@ ...@@ -40,7 +41,8 @@
>pygeoip.const.COUNTRY_EDITION_V6</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#COUNTRY_NAMES" >pygeoip.const.COUNTRY_EDITION_V6</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#COUNTRY_NAMES"
>pygeoip.const.COUNTRY_NAMES</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#DATABASE_INFO_MAX_SIZE" >pygeoip.const.COUNTRY_NAMES</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#DATABASE_INFO_MAX_SIZE"
>pygeoip.const.DATABASE_INFO_MAX_SIZE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#DMA_MAP" >pygeoip.const.DATABASE_INFO_MAX_SIZE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#DMA_MAP"
>pygeoip.const.DMA_MAP</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#FIPS_RANGE" >pygeoip.const.DMA_MAP</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#ENCODING"
>pygeoip.const.ENCODING</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#FIPS_RANGE"
>pygeoip.const.FIPS_RANGE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#FULL_RECORD_LENGTH" >pygeoip.const.FIPS_RANGE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#FULL_RECORD_LENGTH"
>pygeoip.const.FULL_RECORD_LENGTH</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#GEOIP_MEMORY_CACHE" >pygeoip.const.FULL_RECORD_LENGTH</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#GEOIP_MEMORY_CACHE"
>pygeoip.const.GEOIP_MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#GEOIP_STANDARD" >pygeoip.const.GEOIP_MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#GEOIP_STANDARD"
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
>GeoIPBase</a><br /> <a target="mainFrame" href="pygeoip.GeoIPError-class.html" >GeoIPBase</a><br /> <a target="mainFrame" href="pygeoip.GeoIPError-class.html"
>GeoIPError</a><br /> <a target="mainFrame" href="pygeoip.GeoIPMetaclass-class.html" >GeoIPError</a><br /> <a target="mainFrame" href="pygeoip.GeoIPMetaclass-class.html"
>GeoIPMetaclass</a><br /> <h2 class="toc">Variables</h2> >GeoIPMetaclass</a><br /> <h2 class="toc">Variables</h2>
<a target="mainFrame" href="pygeoip-module.html#MEMORY_CACHE" <a target="mainFrame" href="pygeoip-module.html#ENCODING"
>ENCODING</a><br /> <a target="mainFrame" href="pygeoip-module.html#MEMORY_CACHE"
>MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#MMAP_CACHE" >MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#MMAP_CACHE"
>MMAP_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#STANDARD" >MMAP_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#STANDARD"
>STANDARD</a><br /> <a target="mainFrame" href="pygeoip-module.html#__package__" >STANDARD</a><br /> <a target="mainFrame" href="pygeoip-module.html#__package__"
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
>COUNTRY_EDITION_V6</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#COUNTRY_NAMES" >COUNTRY_EDITION_V6</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#COUNTRY_NAMES"
>COUNTRY_NAMES</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#DATABASE_INFO_MAX_SIZE" >COUNTRY_NAMES</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#DATABASE_INFO_MAX_SIZE"
>DATABASE_INFO_MAX_SIZE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#DMA_MAP" >DATABASE_INFO_MAX_SIZE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#DMA_MAP"
>DMA_MAP</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#FIPS_RANGE" >DMA_MAP</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#ENCODING"
>ENCODING</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#FIPS_RANGE"
>FIPS_RANGE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#FULL_RECORD_LENGTH" >FIPS_RANGE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#FULL_RECORD_LENGTH"
>FULL_RECORD_LENGTH</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#GEOIP_MEMORY_CACHE" >FULL_RECORD_LENGTH</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#GEOIP_MEMORY_CACHE"
>GEOIP_MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#GEOIP_STANDARD" >GEOIP_MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#GEOIP_STANDARD"
......
...@@ -7,10 +7,8 @@ from tests.config import COUNTRY_DB_PATH ...@@ -7,10 +7,8 @@ from tests.config import COUNTRY_DB_PATH
class TestGeoIPCacheMethods(unittest.TestCase): class TestGeoIPCacheMethods(unittest.TestCase):
def setUp(self): def setUp(self):
self.us_hostname = 'google.com'
self.us_ip = '64.233.161.99' self.us_ip = '64.233.161.99'
self.us_code = 'US' self.us_code = 'US'
self.us_name = 'United States'
self.gi_mmap = pygeoip.GeoIP(COUNTRY_DB_PATH, MMAP_CACHE) self.gi_mmap = pygeoip.GeoIP(COUNTRY_DB_PATH, MMAP_CACHE)
self.gi_memory = pygeoip.GeoIP(COUNTRY_DB_PATH, MEMORY_CACHE) self.gi_memory = pygeoip.GeoIP(COUNTRY_DB_PATH, MEMORY_CACHE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment