diff --git a/README.md b/README.md index eda23d1..29bb371 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ pyhamtools ========== -A Library with Amateur Radio specific Functions and Methods +A Library with Amateur Radio specific Functions and Classes. + +The library is currently in Alpha state. Please do not use this library for operational code. diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index 967e854..33de1d1 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/lookuplib.doctree b/docs/build/doctrees/lookuplib.doctree index e97d050..9abe054 100644 Binary files a/docs/build/doctrees/lookuplib.doctree and b/docs/build/doctrees/lookuplib.doctree differ diff --git a/docs/build/html/lookuplib.html b/docs/build/html/lookuplib.html index 5c1a2b3..8fad27f 100644 --- a/docs/build/html/lookuplib.html +++ b/docs/build/html/lookuplib.html @@ -84,7 +84,7 @@ lookup against the Clublog API.

-is_invalid_operation(callsign, timestamp=datetime.datetime(2014, 4, 24, 15, 3, 44, 979191, tzinfo=<UTC>))
+is_invalid_operation(callsign, timestamp=datetime.datetime(2014, 4, 24, 15, 46, 11, 956076, tzinfo=<UTC>))

Returns True if an operations is known as invalid

@@ -103,25 +103,27 @@ lookup against the Clublog API.

Raises:
    -
  • NoResult – +
  • NoResult – No matching callsign found
  • -
  • APIKeyMissingError – +
  • APIKeyMissingError – API Key for Clublog missing or incorrect
-

Notes

-

This method is available for:

-
-lookup_callsign(callsign=None, timestamp=datetime.datetime(2014, 4, 24, 15, 3, 44, 979170, tzinfo=<UTC>))
+lookup_callsign(callsign=None, timestamp=datetime.datetime(2014, 4, 24, 15, 46, 11, 956058, tzinfo=<UTC>))

Returns lookup data if an exception exists for a callsign

@@ -140,22 +142,24 @@ API Key for Clublog missing or incorrect
Raises:
    -
  • NoResult – +
  • NoResult – No matching callsign found
  • -
  • APIKeyMissingError – +
  • APIKeyMissingError – API Key for Clublog missing or incorrect
-

Notes

-

This method is available for:

-
@@ -179,19 +183,16 @@ No matching entity found

Note

-
-
This method is available for:
-
    +

    This method is available for the following lookup type

    +
    • clublogxml
    -
-
-lookup_prefix(prefix, timestamp=datetime.datetime(2014, 4, 24, 15, 3, 44, 979170, tzinfo=<UTC>))
+lookup_prefix(prefix, timestamp=datetime.datetime(2014, 4, 24, 15, 46, 11, 956058, tzinfo=<UTC>))

Returns lookup data of a Prefix

@@ -210,58 +211,59 @@ No matching entity found
Raises:
    -
  • NoResult – +
  • NoResult – No matching Prefix found
  • -
  • APIKeyMissingError – +
  • APIKeyMissingError – API Key for Clublog missing or incorrect
-

Notes

-

This method is available for:

-
-lookup_zone_exception(callsign, timestamp=datetime.datetime(2014, 4, 24, 15, 3, 44, 979197, tzinfo=<UTC>))
+lookup_zone_exception(callsign, timestamp=datetime.datetime(2014, 4, 24, 15, 46, 11, 956082, tzinfo=<UTC>))

Returns a CQ Zone if an exception exists for the given callsign

+

Args: +callsign (string): Amateur radio callsign +timestamp (datetime, optional): datetime in UTC (tzinfo=pytz.UTC)

- - - - -
Parameters:
    -
  • callsign (string) – Amateur radio callsign
  • -
  • timestamp (datetime, optional) – datetime in UTC (tzinfo=pytz.UTC)
  • -
+
Returns:

Value of the the CQ Zone exception which exists for this callsign (at the given time)

Returns:

Value of the the CQ Zone exception which exists for this callsign (at the given time)

+
Return type:

int

Return type:

int

-
Raises:
    -
  • NoResult – +
Raises:
    +
  • NoResult – No matching callsign found
  • -
  • APIKeyMissingError – +
  • APIKeyMissingError – API Key for Clublog missing or incorrect
-

Notes

-

This method is available for:

-
diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index cb9eac0..603cdb9 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:42,terms:{all:3,code:0,identifi:3,text:[],prefix:3,radio:[0,3],same:3,follow:0,entiti:3,xml:3,current:0,clublogxml:3,zone:3,explain:[],except:3,dict:3,tzinfo:3,bool:3,logger:3,match:3,applic:0,lookup_ent:3,sourc:3,"return":3,string:3,variou:3,utc:3,python:[0,3],timestamp:3,veri:[],requir:3,infrequ:3,like:0,specif:3,bla:2,"default":3,stuff:[],necessari:0,contain:[0,3],found:3,readthedoc:0,page:0,some:0,see:0,callsign:[0,3],connect:3,download:3,librari:[0,3],even:3,index:0,lookuptyp:3,lookup_prefix:3,lookup_zone_except:3,content:[],version:0,internet:3,print:[],irc:0,complic:[],method:3,kei:3,differ:3,dictionari:3,org:[0,3],come:0,lookup_callsign:3,valu:3,search:0,cty:3,against:3,datetim:3,countri:3,dh1tw:[0,1,2],com:[0,3],frequent:0,oper:3,apikeymissingerror:3,modul:[],filenam:3,api:3,"__name__":3,noresult:3,miss:3,given:3,log:3,wai:3,three:3,avail:3,interfac:3,paramet:3,type:3,more:3,amateur:[0,3],option:3,is_invalid_oper:3,pytz:3,pars:0,known:3,getter:3,"true":3,countryfil:3,none:3,provid:3,access:3,structur:3,record:3,apikei:3,can:3,str:3,webirc:0,creat:0,"int":3,clublogapi:3,exist:3,file:[0,3],deltaxrai:0,plist:3,incorrect:3,perform:3,detail:3,invalid:3,note:3,lookup:3,which:[0,3],you:0,mit:2,lookuplib:[],updat:3,http:[0,3],clublog:3,rais:3,adif:3,bsd:0,data:3,"class":[0,3],homogen:3,github:0,faster:0,descript:[],issu:0,hamtest:0,contact:[],getlogg:3,thi:3,time:3,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:[]}}) \ No newline at end of file +Search.setIndex({envversion:42,terms:{all:3,code:0,identifi:3,text:[],prefix:3,radio:[0,3],same:3,follow:[0,3],entiti:3,xml:3,current:0,clublogxml:3,zone:3,explain:[],except:3,dict:3,tzinfo:3,bool:3,logger:3,match:3,applic:0,lookup_ent:3,sourc:3,"return":3,string:3,variou:3,utc:3,python:[0,3],timestamp:3,veri:[],requir:3,infrequ:3,like:0,specif:3,bla:2,"default":3,stuff:[],necessari:0,contain:[0,3],found:3,readthedoc:0,page:0,some:0,see:0,callsign:[0,3],connect:3,arg:3,download:3,librari:[0,3],even:3,index:0,lookuptyp:3,lookup_prefix:3,lookup_zone_except:3,content:[],version:0,internet:3,print:[],irc:0,complic:[],method:3,kei:3,differ:3,dictionari:3,org:[0,3],come:0,lookup_callsign:3,valu:3,search:0,cty:3,against:3,datetim:3,countri:3,dh1tw:[0,1,2],com:[0,3],frequent:0,oper:3,apikeymissingerror:3,modul:[],filenam:3,api:3,"__name__":3,noresult:3,miss:3,given:3,log:3,wai:3,three:3,avail:3,interfac:3,paramet:3,type:3,more:3,amateur:[0,3],option:3,is_invalid_oper:3,pytz:3,pars:0,known:3,getter:3,"true":3,countryfil:3,none:3,provid:3,access:3,structur:3,record:3,apikei:3,can:3,str:3,webirc:0,creat:0,"int":3,clublogapi:3,exist:3,file:[0,3],deltaxrai:0,plist:3,incorrect:3,perform:3,detail:3,invalid:3,note:[],lookup:3,which:[0,3],you:0,mit:2,lookuplib:[],updat:3,http:[0,3],clublog:3,rais:3,adif:3,bsd:0,data:3,"class":[0,3],homogen:3,github:0,faster:0,descript:[],issu:0,hamtest:0,contact:[],getlogg:3,thi:3,time:3,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:[]}}) \ No newline at end of file diff --git a/pyhamtools/lookuplib.py b/pyhamtools/lookuplib.py index 5ec15f5..7462158 100644 --- a/pyhamtools/lookuplib.py +++ b/pyhamtools/lookuplib.py @@ -37,20 +37,11 @@ class LookupLib(object): By default, LookupLib requires an Internet connection to download the libraries or perform the lookup against the Clublog API. - Parameters - ---------- - 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 - - logger : logging.getLogger(__name__), optional - Python logger - + 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 + logger (logging.getLogger(__name__), optional): Python logger """ def __init__(self, lookuptype = "clublogxml", apikey=None, filename=None, logger=None): @@ -103,8 +94,9 @@ class LookupLib(object): NoResult: No matching entity found Note: - This method is available for: - - clublogxml + This method is available for the following lookup type + + - clublogxml """ @@ -125,34 +117,23 @@ class LookupLib(object): """ Returns lookup data if an exception exists for a callsign - Parameters - ---------- - callsign : string - Amateur radio callsign + Args: + callsign (string): Amateur radio callsign + timestamp (datetime, optional): datetime in UTC (tzinfo=pytz.UTC) - timestamp : datetime, optional - datetime in UTC (tzinfo=pytz.UTC) + Returns: + dict: Dictionary containing the country specific data of the callsign - Returns - ------- - dict - Dictionary containing the country specific data of the callsign + Raises: + NoResult: No matching callsign found + APIKeyMissingError: API Key for Clublog missing or incorrect - Raises - ------ - NoResult - No matching callsign found + Note: + This method is available for - APIKeyMissingError - API Key for Clublog missing or incorrect - - Notes - ----- - This method is available for: - - - clublogxml - - clublogapi - - countryfile + - clublogxml + - clublogapi + - countryfile """ callsign = callsign.strip().upper() @@ -195,33 +176,22 @@ class LookupLib(object): """ Returns lookup data of a Prefix - Parameters - ---------- - prefix : string - Prefix of a Amateur Radio callsign + Args: + prefix (string): Prefix of a Amateur Radio callsign + timestamp (datetime, optional): datetime in UTC (tzinfo=pytz.UTC) - timestamp : datetime, optional - datetime in UTC (tzinfo=pytz.UTC) + Returns: + dict: Dictionary containing the country specific data of the Prefix - Returns - ------- - dict - Dictionary containing the country specific data of the Prefix + Raises: + NoResult: No matching Prefix found + APIKeyMissingError: API Key for Clublog missing or incorrect - Raises - ------ - NoResult - No matching Prefix found + Note: + This method is available for - APIKeyMissingError - API Key for Clublog missing or incorrect - - Notes - ----- - This method is available for: - - - clublogxml - - countryfile + - clublogxml + - countryfile """ @@ -257,32 +227,21 @@ class LookupLib(object): """ Returns True if an operations is known as invalid - Parameters - ---------- - callsign : string - Amateur Radio callsign + Args: + callsign (string): Amateur Radio callsign + timestamp (datetime, optional): datetime in UTC (tzinfo=pytz.UTC) - timestamp : datetime, optional - datetime in UTC (tzinfo=pytz.UTC) + Returns: + bool: True if a record exists for this callsign (at the given time) - Returns - ------- - bool - True if a record exists for this callsign (at the given time) + Raises: + NoResult: No matching callsign found + APIKeyMissingError: API Key for Clublog missing or incorrect - Raises - ------ - NoResult - No matching callsign found + Note: + This method is available for - APIKeyMissingError - API Key for Clublog missing or incorrect - - Notes - ----- - This method is available for: - - - clublogxml + - clublogxml """ @@ -323,32 +282,21 @@ class LookupLib(object): """ Returns a CQ Zone if an exception exists for the given callsign - Parameters - ---------- - callsign : string - Amateur radio callsign + Args: + callsign (string): Amateur radio callsign + timestamp (datetime, optional): datetime in UTC (tzinfo=pytz.UTC) - timestamp : datetime, optional - datetime in UTC (tzinfo=pytz.UTC) + Returns: + int: Value of the the CQ Zone exception which exists for this callsign (at the given time) - Returns - ------- - int - Value of the the CQ Zone exception which exists for this callsign (at the given time) + Raises: + NoResult: No matching callsign found + APIKeyMissingError: API Key for Clublog missing or incorrect - Raises - ------ - NoResult - No matching callsign found + Note: + This method is available for - APIKeyMissingError - API Key for Clublog missing or incorrect - - Notes - ----- - This method is available for: - - - clublogxml + - clublogxml """