updated LookupLib documentation

This commit is contained in:
dh1tw 2014-04-26 00:22:57 +02:00
parent 4e4e94091d
commit 2017b1bf6d
17 changed files with 259 additions and 28 deletions

BIN
docs/build/doctrees/Callinfo.doctree vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

132
docs/build/html/Callinfo.html vendored Normal file
View file

@ -0,0 +1,132 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Callinfo &mdash; pyhamtools 0.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="pyhamtools 0.1 documentation" href="index.html" />
<link rel="next" title="LookupLib" href="LookupLib.html" />
<link rel="prev" title="PyHamTools" href="index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="LookupLib.html" title="LookupLib"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="PyHamTools"
accesskey="P">previous</a> |</li>
<li><a href="index.html">pyhamtools 0.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="callinfo">
<h1>Callinfo<a class="headerlink" href="#callinfo" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul class="simple">
</ul>
</div>
<span class="target" id="module-pyhamtools.callinfo"></span><dl class="class">
<dt id="pyhamtools.callinfo.Callinfo">
<em class="property">class </em><tt class="descclassname">pyhamtools.callinfo.</tt><tt class="descname">Callinfo</tt><big>(</big><em>lookuplib</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo" title="Permalink to this definition"></a></dt>
<dd><p>This is going to going to return information for a callsign</p>
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.getHomeCall">
<tt class="descname">getHomeCall</tt><big>(</big><em>callsign</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.getHomeCall" title="Permalink to this definition"></a></dt>
<dd><p>verify call and strip off any /ea1 vp5/ /qrp etc</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">PyHamTools</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="LookupLib.html"
title="next chapter">LookupLib</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/Callinfo.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="LookupLib.html" title="LookupLib"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="PyHamTools"
>previous</a> |</li>
<li><a href="index.html">pyhamtools 0.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2014, Tobias Wellnitz, DH1TW.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>

10
docs/build/html/_sources/Callinfo.txt vendored Normal file
View file

@ -0,0 +1,10 @@
Callinfo
========
.. toctree::
:maxdepth: 2
.. automodule:: pyhamtools.callinfo
.. autoclass:: Callinfo
:members:

View file

@ -6,7 +6,7 @@
:Version: |release|
:Code: https://github.com/dh1tw/pyhamtools
:License: BSD; see LICENSE file
:License: MIT; see LICENSE file
:Issues: https://github.com/dh1tw/pyhamtools/issues
:Documentation: http://pyhamtools.readthedocs.org/
:IRC: #hamtests on webirc.deltaxray.org
@ -26,6 +26,7 @@ Clases:
.. toctree::
:maxdepth: 2
Callinfo
LookupLib

View file

@ -49,11 +49,33 @@
<h1 id="index">Index</h1>
<div class="genindex-jumpbox">
<a href="#I"><strong>I</strong></a>
<a href="#C"><strong>C</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#L"><strong>L</strong></a>
| <a href="#P"><strong>P</strong></a>
</div>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="Callinfo.html#pyhamtools.callinfo.Callinfo">Callinfo (class in pyhamtools.callinfo)</a>
</dt>
</dl></td>
</tr></table>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="Callinfo.html#pyhamtools.callinfo.Callinfo.getHomeCall">getHomeCall() (pyhamtools.callinfo.Callinfo method)</a>
</dt>
</dl></td>
</tr></table>
<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
@ -96,6 +118,12 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="Callinfo.html#module-pyhamtools.callinfo">pyhamtools.callinfo (module)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="LookupLib.html#module-pyhamtools.lookuplib">pyhamtools.lookuplib (module)</a>
</dt>

View file

@ -24,7 +24,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="pyhamtools 0.1 documentation" href="#" />
<link rel="next" title="LookupLib" href="LookupLib.html" />
<link rel="next" title="Callinfo" href="Callinfo.html" />
</head>
<body>
<div class="related">
@ -37,7 +37,7 @@
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="LookupLib.html" title="LookupLib"
<a href="Callinfo.html" title="Callinfo"
accesskey="N">next</a> |</li>
<li><a href="#">pyhamtools 0.1 documentation</a> &raquo;</li>
</ul>
@ -58,7 +58,7 @@
</tr>
<tr class="field-even field"><th class="field-name">Code:</th><td class="field-body"><a class="reference external" href="https://github.com/dh1tw/pyhamtools">https://github.com/dh1tw/pyhamtools</a></td>
</tr>
<tr class="field-odd field"><th class="field-name">License:</th><td class="field-body">BSD; see LICENSE file</td>
<tr class="field-odd field"><th class="field-name">License:</th><td class="field-body">MIT; see LICENSE file</td>
</tr>
<tr class="field-even field"><th class="field-name">Issues:</th><td class="field-body"><a class="reference external" href="https://github.com/dh1tw/pyhamtools/issues">https://github.com/dh1tw/pyhamtools/issues</a></td>
</tr>
@ -78,6 +78,9 @@ with some modules and classes which are frequently necessary, like parsing of an
<h2>Clases:<a class="headerlink" href="#clases" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Callinfo.html">Callinfo</a><ul class="simple">
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="LookupLib.html">LookupLib</a><ul class="simple">
</ul>
</li>
@ -113,8 +116,8 @@ with some modules and classes which are frequently necessary, like parsing of an
</ul>
<h4>Next topic</h4>
<p class="topless"><a href="LookupLib.html"
title="next chapter">LookupLib</a></p>
<p class="topless"><a href="Callinfo.html"
title="next chapter">Callinfo</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.txt"
@ -147,7 +150,7 @@ with some modules and classes which are frequently necessary, like parsing of an
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="LookupLib.html" title="LookupLib"
<a href="Callinfo.html" title="Callinfo"
>next</a> |</li>
<li><a href="#">pyhamtools 0.1 documentation</a> &raquo;</li>
</ul>

View file

@ -24,7 +24,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="pyhamtools 0.1 documentation" href="index.html" />
<link rel="prev" title="PyHamTools" href="index.html" />
<link rel="prev" title="Callinfo" href="Callinfo.html" />
</head>
<body>
<div class="related">
@ -37,7 +37,7 @@
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="index.html" title="PyHamTools"
<a href="Callinfo.html" title="Callinfo"
accesskey="P">previous</a> |</li>
<li><a href="index.html">pyhamtools 0.1 documentation</a> &raquo;</li>
</ul>
@ -63,8 +63,8 @@
<li>Clublog.org (HTTPS lookup)</li>
<li>Country-files.com (infrequently updated PLIST File)</li>
</ol>
<p>It&#8217;s aim is to provide a homogeneous interface to different data sources.</p>
<p>Typically it is injected as a dependency in the Callinfo class, but can also be used directly.</p>
<p>It&#8217;s aim is to provide a homogeneous interface to different databases.</p>
<p>Typically an instance of this class is injected as a dependency in the <tt class="xref py py-class docutils literal"><span class="pre">Callinfo</span></tt> class, but it can also be used directly.</p>
<p>Even the interface is the same for all lookup sources, the returning data can be different.
The documentation of the various methods provide more detail.</p>
<p>By default, LookupLib requires an Internet connection to download the libraries or perform the
@ -76,7 +76,7 @@ lookup against the Clublog API.</p>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>lookuptype</strong> (<em>str</em>) &#8211; &#8220;clublogxml&#8221; or &#8220;clublogapi&#8221; or &#8220;countryfile&#8221;</li>
<li><strong>apikey</strong> (<em>str</em>) &#8211; Clublog API Key</li>
<li><strong>filename</strong> (<em>str, optional</em>) &#8211; Filename for Clublog XML or Country-files.com cty.plist file</li>
<li><strong>filename</strong> (<em>str, optional</em>) &#8211; Filename for Clublog XML or Country-files.com cty.plist file. When a local file is used, no Internet connection not API Key is necessary.</li>
<li><strong>logger</strong> (<em>logging.getLogger(__name__), optional</em>) &#8211; Python logger</li>
</ul>
</td>
@ -85,7 +85,7 @@ lookup against the Clublog API.</p>
</table>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.is_invalid_operation">
<tt class="descname">is_invalid_operation</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>25</em>, <em>21</em>, <em>44</em>, <em>34</em>, <em>169942</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.is_invalid_operation" title="Permalink to this definition"></a></dt>
<tt class="descname">is_invalid_operation</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>25</em>, <em>22</em>, <em>19</em>, <em>33</em>, <em>219680</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.is_invalid_operation" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if an operations is known as invalid</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -140,7 +140,7 @@ API Key for Clublog missing or incorrect</li>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.lookup_callsign">
<tt class="descname">lookup_callsign</tt><big>(</big><em>callsign=None</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>25</em>, <em>21</em>, <em>44</em>, <em>34</em>, <em>169924</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_callsign" title="Permalink to this definition"></a></dt>
<tt class="descname">lookup_callsign</tt><big>(</big><em>callsign=None</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>25</em>, <em>22</em>, <em>19</em>, <em>33</em>, <em>219601</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_callsign" title="Permalink to this definition"></a></dt>
<dd><p>Returns lookup data if an exception exists for a callsign</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -200,7 +200,7 @@ API Key for Clublog missing or incorrect</li>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.lookup_entity">
<tt class="descname">lookup_entity</tt><big>(</big><em>entity=None</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_entity" title="Permalink to this definition"></a></dt>
<dd><p>Returns lookup data of a ADIF Entity</p>
<dd><p>Returns lookup data of an ADIF Entity</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@ -244,7 +244,7 @@ the id 273.</p>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.lookup_prefix">
<tt class="descname">lookup_prefix</tt><big>(</big><em>prefix</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>25</em>, <em>21</em>, <em>44</em>, <em>34</em>, <em>169924</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_prefix" title="Permalink to this definition"></a></dt>
<tt class="descname">lookup_prefix</tt><big>(</big><em>prefix</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>25</em>, <em>22</em>, <em>19</em>, <em>33</em>, <em>219601</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_prefix" title="Permalink to this definition"></a></dt>
<dd><p>Returns lookup data of a Prefix</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -301,7 +301,7 @@ database (default database).</p>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.lookup_zone_exception">
<tt class="descname">lookup_zone_exception</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>25</em>, <em>21</em>, <em>44</em>, <em>34</em>, <em>169948</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_zone_exception" title="Permalink to this definition"></a></dt>
<tt class="descname">lookup_zone_exception</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>25</em>, <em>22</em>, <em>19</em>, <em>33</em>, <em>219687</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_zone_exception" title="Permalink to this definition"></a></dt>
<dd><p>Returns a CQ Zone if an exception exists for the given callsign</p>
<p>Args:
callsign (string): Amateur radio callsign
@ -356,8 +356,8 @@ in CQ Zone 38</p>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">PyHamTools</a></p>
<p class="topless"><a href="Callinfo.html"
title="previous chapter">Callinfo</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/LookupLib.txt"
@ -390,7 +390,7 @@ in CQ Zone 38</p>
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="index.html" title="PyHamTools"
<a href="Callinfo.html" title="Callinfo"
>previous</a> |</li>
<li><a href="index.html">pyhamtools 0.1 documentation</a> &raquo;</li>
</ul>

Binary file not shown.

View file

@ -64,6 +64,11 @@
<td>
<tt class="xref">pyhamtools</tt></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="Callinfo.html#module-pyhamtools.callinfo"><tt class="xref">pyhamtools.callinfo</tt></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;

View file

@ -1 +1 @@
Search.setIndex({envversion:42,terms:{all:[3,2],code:[0,3],identifi:3,show:3,illustr:[],text:[],clublog:3,obtain:[3,2],myapikei:3,prefix:3,radio:[0,3],same:3,permiss:2,follow:[0,3,2],data:3,bsd:0,entiti:3,xml:3,current:0,clublogxml:3,depend:3,copyright:2,how:3,holder:2,explain:[],tobia:2,except:3,should:[],tort:2,valid:3,dict:3,ituz:3,queri:3,tzinfo:3,aris:2,logger:3,therefor:3,match:3,merchant:2,applic:0,lookup_ent:3,sourc:3,"return":3,string:3,variou:3,utc:3,python:[0,3],timestamp:3,express:2,kind:2,softwar:2,whether:2,condit:2,veri:[],liabl:2,month:3,charg:2,requir:3,infrequ:3,warranti:2,like:0,specif:3,bla:[],"try":3,provid:[3,2],stuff:[],necessari:0,contain:[0,3],found:3,readthedoc:0,page:0,impli:2,right:2,deal:2,replac:3,some:0,see:0,callsign:[0,3],connect:[3,2],arg:3,download:3,http:[0,3],event:2,librari:[0,3],out:2,even:3,index:0,lookuptyp:3,turkmenistan:3,lookup_prefix:3,databas:3,rep:3,publish:2,lookup_zone_except:3,content:[],delet:3,written:[],version:0,inject:3,action:2,internet:3,print:3,"import":3,irc:0,complic:[],method:3,abov:2,kei:3,differ:3,free:2,dictionari:3,locat:3,come:0,lookup_callsign:3,valu:3,log:3,search:0,fit:2,island:3,cty:3,against:3,datetim:3,person:2,doctest:[],permit:2,fals:3,countri:3,typic:3,dh1tw:[0,1,2],com:[0,3],assign:3,frequent:0,oper:3,apikeymissingerror:3,directli:3,merg:2,modul:[],two:3,restrict:2,filenam:3,api:3,org:[0,3],noresult:[],bool:3,miss:3,damag:2,liabil:2,given:3,from:[3,2],christma:3,wai:[],whom:2,modifi:2,three:3,wrapper:3,avail:3,cqz:3,station:3,interfac:3,includ:2,paramet:3,type:3,more:3,"function":[],amateur:[0,3],option:3,copi:2,keyerror:3,notic:2,is_invalid_oper:3,pytz:3,pars:0,callinfo:3,particular:2,known:3,getter:[],herebi:2,"true":3,countryfil:3,none:3,sell:2,"default":3,access:[],structur:[],exampl:3,aim:3,record:3,contin:3,limit:2,can:3,str:3,webirc:0,otherwis:2,purpos:2,latitud:3,claim:2,substanti:2,creat:0,"int":3,clublogapi:3,year:3,my_lookuplib:3,ani:2,dp0gvn:3,antarctica:3,inform:3,exist:3,contract:2,file:[0,3,2],onlin:3,seem:3,deltaxrai:0,plist:3,incorrect:3,issu:0,mylookuplib:3,author:2,perform:3,apikei:3,detail:3,invalid:3,check:3,note:[],also:3,other:2,lookup:3,which:[0,3],you:0,subject:2,mit:2,lookuplib:[],updat:3,furnish:2,example_gener:[],"5w1cfn":3,germani:3,distribut:2,shall:2,fed:3,dai:3,befor:3,zone:3,rais:3,adif:3,sublicens:2,date:3,associ:2,"class":[0,3],longitud:3,homogen:3,noninfring:2,github:0,faster:0,"__name__":3,grant:2,descript:[],wellnitz:2,without:2,vk9xo:3,hamtest:0,portion:2,contact:[],getlogg:3,thi:[3,2],time:3,format:[],hello:[],daili:3},objtypes:{"0":"py:module","1":"py:method","2":"py:class"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"]},filenames:["index","help","license","LookupLib"],titles:["PyHamTools","help","license","LookupLib"],objects:{pyhamtools:{lookuplib:[3,0,0,"-"]},"pyhamtools.lookuplib":{LookupLib:[3,2,1,""]},"pyhamtools.lookuplib.LookupLib":{lookup_prefix:[3,1,1,""],lookup_entity:[3,1,1,""],lookup_zone_exception:[3,1,1,""],lookup_callsign:[3,1,1,""],is_invalid_operation:[3,1,1,""]}},titleterms:{help:1,anoth:[],licens:2,clase:0,indic:0,content:[],header:[],contact:2,tabl:0,pyhamtool:0,document:[],simpl:[],modul:0,lookuplib:3,welcom:[]}})
Search.setIndex({envversion:42,terms:{oper:4,all:[4,3],code:[0,4],identifi:4,show:4,illustr:[],text:[],obtain:[4,3],myapikei:4,prefix:4,radio:[0,4],invalid:4,permiss:3,follow:[0,4,3],lookup:4,apikeymissingerror:4,entiti:4,xml:4,content:[],clublogxml:4,depend:4,copyright:3,also:4,"true":4,explain:[],tobia:3,except:4,should:[],tort:3,other:3,dict:4,ituz:4,queri:4,tzinfo:4,aris:3,logger:4,therefor:4,local:4,match:4,merchant:3,applic:0,lookup_ent:4,sourc:4,"return":[1,4],string:4,variou:4,countryfil:4,python:[0,4],timestamp:4,express:3,dai:4,"import":4,veri:[],liabl:3,month:4,associ:3,requir:4,warranti:3,like:0,specif:4,complic:[],"try":4,provid:[4,3],stuff:[],necessari:[0,4],contain:[0,4],found:4,readthedoc:0,page:0,impli:3,right:3,deal:3,example_gener:[],replac:4,some:0,see:0,callsign:[0,1,4],connect:[4,3],arg:4,download:4,germani:4,event:3,librari:[0,4],out:3,even:4,index:0,lookuptyp:4,turkmenistan:4,lookup_prefix:4,databas:4,rep:4,publish:3,lookup_zone_except:4,current:0,delet:4,written:[],version:0,inject:4,action:3,internet:4,print:4,condit:3,irc:0,bla:[],method:4,str:4,kei:4,longitud:4,given:4,free:3,dictionari:4,locat:4,come:0,lookup_callsign:4,valu:4,christma:4,search:0,fit:3,island:4,cty:4,against:4,datetim:4,instanc:4,doctest:[],permit:3,fals:4,countri:4,typic:4,dh1tw:[0,2,3],com:[0,4],assign:4,frequent:0,"default":4,vp5:1,softwar:3,adif:4,directli:4,modul:[],damag:3,three:4,qrp:1,filenam:4,api:4,strip:1,ea1:1,noresult:[],miss:4,merg:3,liabil:3,differ:4,from:[4,3],log:4,wai:[],cqz:4,modifi:3,etc:1,contact:[],two:4,wrapper:4,github:0,avail:4,whom:3,station:4,interfac:4,includ:3,paramet:4,call:1,daili:4,type:4,more:4,"function":[],amateur:[0,4],option:4,copi:3,keyerror:4,notic:3,is_invalid_oper:4,pytz:4,pars:0,callinfo:[],particular:3,known:4,herebi:3,holder:3,utc:4,kind:3,whether:3,access:[],structur:[],exampl:4,aim:4,record:4,contin:4,limit:3,can:4,abov:3,webirc:0,otherwis:3,hamtest:0,purpos:3,latitud:4,claim:3,file:[0,4,3],creat:0,"int":4,descript:[],year:4,my_lookuplib:4,ani:[1,3],dp0gvn:4,antarctica:4,inform:[1,4],exist:4,contract:3,substanti:3,onlin:4,seem:4,deltaxrai:0,plist:4,sell:3,vk9xo:4,mylookuplib:4,date:4,author:3,perform:4,apikei:4,when:4,detail:4,same:4,check:4,note:[],how:4,valid:4,bool:4,which:[0,4],none:4,verifi:1,you:0,subject:3,mit:[0,3],lookuplib:[],updat:4,incorrect:4,"5w1cfn":4,http:[0,4],clublog:4,shall:3,org:[0,4],fed:4,restrict:3,befor:4,zone:4,rais:4,distribut:3,sublicens:3,bsd:[],data:4,"class":[0,1,4],charg:3,homogen:4,noninfring:3,infrequ:4,off:1,faster:0,"__name__":4,grant:3,clublogapi:4,wellnitz:3,without:3,issu:0,person:3,portion:3,getter:[],gethomecal:1,getlogg:4,thi:[1,4,3],time:4,format:[],hello:[],furnish:3},objtypes:{"0":"py:module","1":"py:method","2":"py:class"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"]},filenames:["index","Callinfo","help","license","LookupLib"],titles:["PyHamTools","Callinfo","help","license","LookupLib"],objects:{pyhamtools:{callinfo:[1,0,0,"-"],lookuplib:[4,0,0,"-"]},"pyhamtools.callinfo.Callinfo":{getHomeCall:[1,1,1,""]},"pyhamtools.lookuplib":{LookupLib:[4,2,1,""]},"pyhamtools.lookuplib.LookupLib":{lookup_prefix:[4,1,1,""],lookup_entity:[4,1,1,""],lookup_zone_exception:[4,1,1,""],lookup_callsign:[4,1,1,""],is_invalid_operation:[4,1,1,""]},"pyhamtools.callinfo":{Callinfo:[1,2,1,""]}},titleterms:{help:2,anoth:[],licens:3,clase:0,simpl:[],indic:0,content:[],header:[],contact:3,tabl:0,pyhamtool:0,document:[],callinfo:1,modul:0,lookuplib:4,welcom:[]}})

10
docs/source/Callinfo.rst Normal file
View file

@ -0,0 +1,10 @@
Callinfo
========
.. toctree::
:maxdepth: 2
.. automodule:: pyhamtools.callinfo
.. autoclass:: Callinfo
:members:

View file

@ -6,7 +6,7 @@
:Version: |release|
:Code: https://github.com/dh1tw/pyhamtools
:License: BSD; see LICENSE file
:License: MIT; see LICENSE file
:Issues: https://github.com/dh1tw/pyhamtools/issues
:Documentation: http://pyhamtools.readthedocs.org/
:IRC: #hamtests on webirc.deltaxray.org
@ -26,6 +26,7 @@ Clases:
.. toctree::
:maxdepth: 2
Callinfo
LookupLib

41
pyhamtools/callinfo.py Normal file
View file

@ -0,0 +1,41 @@
class Callinfo(object):
"""
This is going to going to return information for a callsign
"""
def __init__(self, lookuplib):
pass
def getHomeCall(self, callsign):
"""verify call and strip off any /ea1 vp5/ /qrp etc"""
raise NotImplementedError
def isValidCall(self, callsign):
raise NotImplementedError
def get_prefix(self, callsign):
raise NotImplementedError
def getLatLong(self, callsign):
raise NotImplementedError
def getCQZone(self, callsign):
raise NotImplementedError
def getITUZone(self, prefix):
raise NotImplementedError
def getCountry(self, prefix):
raise NotImplementedError
def getAdifID(self, prefix):
raise NotImplementedError
def getContinent(self, prefix):
raise NotImplementedError
def getAll(self, callsign):
raise NotImplementedError

View file

@ -3,7 +3,7 @@ import logging
import logging.config
import re
import random, string
from datetime import datetime, timedelta
from datetime import datetime
import xml.etree.ElementTree as ET
import urllib
import json
@ -30,9 +30,9 @@ class LookupLib(object):
2. Clublog.org (HTTPS lookup)
3. Country-files.com (infrequently updated PLIST File)
It's aim is to provide a homogeneous interface to different data sources.
It's aim is to provide a homogeneous interface to different databases.
Typically it is injected as a dependency in the Callinfo class, but can also be used directly.
Typically an instance of this class is injected as a dependency in the :py:class:`Callinfo` class, but it can also be used directly.
Even the interface is the same for all lookup sources, the returning data can be different.
The documentation of the various methods provide more detail.
@ -43,7 +43,7 @@ class LookupLib(object):
Args:
lookuptype (str) : "clublogxml" or "clublogapi" or "countryfile"
apikey (str): Clublog API Key
filename (str, optional): Filename for Clublog XML or Country-files.com cty.plist file
filename (str, optional): Filename for Clublog XML or Country-files.com cty.plist file. When a local file is used, no Internet connection not API Key is necessary.
logger (logging.getLogger(__name__), optional): Python logger
"""
@ -83,7 +83,7 @@ class LookupLib(object):
raise AttributeError("Lookup type missing")
def lookup_entity(self, entity=None):
"""Returns lookup data of a ADIF Entity
"""Returns lookup data of an ADIF Entity
Args:
entity (int): ADIF identifier of country