From 212f4946a0fc98bcfe13ec01261c3897b659aec3 Mon Sep 17 00:00:00 2001 From: James Downs Date: Thu, 14 Mar 2019 22:44:03 -0700 Subject: [PATCH 1/5] Fix call of print to print() --- python-fcc/FRNConversionsAPI.py | 12 ++++++------ python-fcc/block_conversion_api.py | 2 +- python-fcc/broadband_api.py | 2 +- python-fcc/generic_api.py | 8 ++++---- python-fcc/license_view_api.py | 2 +- python-fcc/sba_businesses_api.py | 2 +- python-fcc/sba_loans_grants_api.py | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/python-fcc/FRNConversionsAPI.py b/python-fcc/FRNConversionsAPI.py index 87fa5b1..eb6e21e 100644 --- a/python-fcc/FRNConversionsAPI.py +++ b/python-fcc/FRNConversionsAPI.py @@ -32,14 +32,14 @@ def __init__(self): bb = FRNConversionsAPI() x=bb.getList(stateCode='IL') - print type(x) - print len(x) - print x.keys() + print(type(x)) + print(len(x)) + print(x.keys()) #print x print x=bb.getInfo(frn='0017855545') - print type(x) - print len(x) - print x + print(type(x)) + print(len(x)) + print(x) diff --git a/python-fcc/block_conversion_api.py b/python-fcc/block_conversion_api.py index cf8c837..6b899f3 100644 --- a/python-fcc/block_conversion_api.py +++ b/python-fcc/block_conversion_api.py @@ -10,4 +10,4 @@ def __init__(self): # Sample use of BlockConversionAPI if __name__ == "__main__": bc = BlockConversionAPI() - print bc.get_block(lat=41, long=-87) # (Should be San Francisco) \ No newline at end of file + print(bc.get_block(lat=41, long=-87)) # (Should be San Francisco) diff --git a/python-fcc/broadband_api.py b/python-fcc/broadband_api.py index 4f8f562..eeb0dfb 100644 --- a/python-fcc/broadband_api.py +++ b/python-fcc/broadband_api.py @@ -12,4 +12,4 @@ def __init__(self): # Sample use of BroadbandApi if __name__ == "__main__": bb = BroadbandApi() - print bb.get_data(latitude=37, longitude=-122) # (Should be San Francisco) \ No newline at end of file + print(bb.get_data(latitude=37, longitude=-122)) # (Should be San Francisco) diff --git a/python-fcc/generic_api.py b/python-fcc/generic_api.py index d11ed36..78033e4 100644 --- a/python-fcc/generic_api.py +++ b/python-fcc/generic_api.py @@ -65,8 +65,8 @@ def format_url(self, *ordered_args, **args): if self.api_style == PHP_STYLE: self.__format_url_php_style(*ordered_args, **args) elif self.api_style == SBA_WEIRD_STYLE: - print ordered_args - print args + print(ordered_args) + print(args) if len(args) != 0: raise MustBeOrderedException # MUST be ordered. @@ -82,7 +82,7 @@ def request(self, *ordered_args, **args): if t.startswith("callback("): t=t[t.index("(")+1:-1] - print self.formatted_url + print(self.formatted_url) try: return json.loads(t) @@ -127,4 +127,4 @@ def generic_api_call(*ordered_args, **kwargs): self.api_objects[number].format_url(*ordered_args, **kwargs) return self.api_objects[number].request(*ordered_args, **kwargs) - self.api_functions.append(generic_api_call) \ No newline at end of file + self.api_functions.append(generic_api_call) diff --git a/python-fcc/license_view_api.py b/python-fcc/license_view_api.py index afa9201..8878583 100644 --- a/python-fcc/license_view_api.py +++ b/python-fcc/license_view_api.py @@ -19,4 +19,4 @@ def __init__(self): # Sample use of BlockConversionAPI if __name__ == "__main__": bc = LicenseViewAPI() - print bc.get_licenses(searchValue = "Verizon Wireless") \ No newline at end of file + print(bc.get_licenses(searchValue = "Verizon Wireless")) diff --git a/python-fcc/sba_businesses_api.py b/python-fcc/sba_businesses_api.py index efcf19b..7482021 100644 --- a/python-fcc/sba_businesses_api.py +++ b/python-fcc/sba_businesses_api.py @@ -30,4 +30,4 @@ def __init__(self): # Sample use of BroadbandApi if __name__ == "__main__": bb = SBABusinessesAPI() - print bb.by_category("doing business as") # (Should be San Francisco) \ No newline at end of file + print(bb.by_category("doing business as")) # (Should be San Francisco) diff --git a/python-fcc/sba_loans_grants_api.py b/python-fcc/sba_loans_grants_api.py index 998c312..d9e7fae 100644 --- a/python-fcc/sba_loans_grants_api.py +++ b/python-fcc/sba_loans_grants_api.py @@ -32,4 +32,4 @@ def __init__(self): # Sample use of BroadbandApi if __name__ == "__main__": bb = SBALoansGrantsAPI() - print bb.by_category("doing business as") # (Should be San Francisco) \ No newline at end of file + print(bb.by_category("doing business as")) # (Should be San Francisco) From 499bb8f17f69f2d7f0e40da0cbfdaa2fa091ea34 Mon Sep 17 00:00:00 2001 From: James Downs Date: Sat, 16 Mar 2019 06:51:19 -0700 Subject: [PATCH 2/5] fix structure for module --- FRNConversionsAPI.py | 45 ------ block_conversion_api.py | 13 -- broadband_api.py | 15 -- .../python-fcc/FRNConversionsAPI.py | 45 ------ .../python-fcc/block_conversion_api.py | 13 -- .../python-fcc/broadband_api.py | 15 -- .../python-fcc/generic_api.py | 130 ------------------ .../python-fcc/license_view_api.py | 22 --- .../python-fcc/sba_businesses_api.py | 33 ----- .../python-fcc/sba_loans_grants_api.py | 35 ----- .../python-fcc/tests/__init__.py | 0 dist/python_fcc-0.1-py2.6.egg | Bin 15914 -> 0 bytes generic_api.py | 130 ------------------ license_view_api.py | 22 --- python-fcc/__init__.py | 0 .../lib.linux-x86_64-2.6/tests/__init__.py | 0 .../lib.linux-x86_64-2.6/tests/__main__.py | 5 - .../lib.linux-x86_64-2.6/tests/testcases.py | 105 -------------- python-fcc/dist/python_fcc-0.1-py2.6.egg | Bin 4389 -> 0 bytes python-fcc/python_fcc.egg-info/PKG-INFO | 10 -- python-fcc/python_fcc.egg-info/SOURCES.txt | 8 -- .../python_fcc.egg-info/dependency_links.txt | 1 - python-fcc/python_fcc.egg-info/top_level.txt | 1 - python-fcc/tests/__init__.py | 0 python-fcc/tests/__main__.py | 5 - python-fcc/tests/testcases.py | 105 -------------- python_fcc.egg-info/PKG-INFO | 10 -- python_fcc.egg-info/SOURCES.txt | 16 --- python_fcc.egg-info/dependency_links.txt | 1 - python_fcc.egg-info/top_level.txt | 1 - .../FRNConversionsAPI.py | 0 __init__.py => python_fcc/__init__.py | 0 .../block_conversion_api.py | 0 {python-fcc => python_fcc}/broadband_api.py | 0 {python-fcc => python_fcc}/generic_api.py | 0 .../license_view_api.py | 0 .../sba_businesses_api.py | 0 .../sba_loans_grants_api.py | 0 .../tests}/__init__.py | 0 .../tests/__main__.py | 0 .../tests/testcases.py | 0 sba_businesses_api.py | 33 ----- sba_loans_grants_api.py | 35 ----- tests/__init__.py | 0 tests/__main__.py | 5 - tests/testcases.py | 105 -------------- 46 files changed, 964 deletions(-) delete mode 100644 FRNConversionsAPI.py delete mode 100644 block_conversion_api.py delete mode 100644 broadband_api.py delete mode 100644 build/lib.linux-x86_64-2.6/python-fcc/FRNConversionsAPI.py delete mode 100644 build/lib.linux-x86_64-2.6/python-fcc/block_conversion_api.py delete mode 100644 build/lib.linux-x86_64-2.6/python-fcc/broadband_api.py delete mode 100644 build/lib.linux-x86_64-2.6/python-fcc/generic_api.py delete mode 100644 build/lib.linux-x86_64-2.6/python-fcc/license_view_api.py delete mode 100644 build/lib.linux-x86_64-2.6/python-fcc/sba_businesses_api.py delete mode 100644 build/lib.linux-x86_64-2.6/python-fcc/sba_loans_grants_api.py delete mode 100644 build/lib.linux-x86_64-2.6/python-fcc/tests/__init__.py delete mode 100644 dist/python_fcc-0.1-py2.6.egg delete mode 100644 generic_api.py delete mode 100644 license_view_api.py delete mode 100644 python-fcc/__init__.py delete mode 100644 python-fcc/build/lib.linux-x86_64-2.6/tests/__init__.py delete mode 100644 python-fcc/build/lib.linux-x86_64-2.6/tests/__main__.py delete mode 100644 python-fcc/build/lib.linux-x86_64-2.6/tests/testcases.py delete mode 100644 python-fcc/dist/python_fcc-0.1-py2.6.egg delete mode 100644 python-fcc/python_fcc.egg-info/PKG-INFO delete mode 100644 python-fcc/python_fcc.egg-info/SOURCES.txt delete mode 100644 python-fcc/python_fcc.egg-info/dependency_links.txt delete mode 100644 python-fcc/python_fcc.egg-info/top_level.txt delete mode 100644 python-fcc/tests/__init__.py delete mode 100644 python-fcc/tests/__main__.py delete mode 100644 python-fcc/tests/testcases.py delete mode 100644 python_fcc.egg-info/PKG-INFO delete mode 100644 python_fcc.egg-info/SOURCES.txt delete mode 100644 python_fcc.egg-info/dependency_links.txt delete mode 100644 python_fcc.egg-info/top_level.txt rename {python-fcc => python_fcc}/FRNConversionsAPI.py (100%) rename __init__.py => python_fcc/__init__.py (100%) rename {python-fcc => python_fcc}/block_conversion_api.py (100%) rename {python-fcc => python_fcc}/broadband_api.py (100%) rename {python-fcc => python_fcc}/generic_api.py (100%) rename {python-fcc => python_fcc}/license_view_api.py (100%) rename {python-fcc => python_fcc}/sba_businesses_api.py (100%) rename {python-fcc => python_fcc}/sba_loans_grants_api.py (100%) rename {build/lib.linux-x86_64-2.6/python-fcc => python_fcc/tests}/__init__.py (100%) rename {build/lib.linux-x86_64-2.6/python-fcc => python_fcc}/tests/__main__.py (100%) rename {build/lib.linux-x86_64-2.6/python-fcc => python_fcc}/tests/testcases.py (100%) delete mode 100644 sba_businesses_api.py delete mode 100644 sba_loans_grants_api.py delete mode 100644 tests/__init__.py delete mode 100644 tests/__main__.py delete mode 100644 tests/testcases.py diff --git a/FRNConversionsAPI.py b/FRNConversionsAPI.py deleted file mode 100644 index 87fa5b1..0000000 --- a/FRNConversionsAPI.py +++ /dev/null @@ -1,45 +0,0 @@ -from generic_api import * -import urllib,json - - -# Simple Python wrapper around the Broadband API provided by the FCC. - -class FRNConversionsAPI(GenericAPI): - """ - FRNConversionsAPI: - - an API to access information about broadband provides. - - original API: http://reboot.fcc.gov/developer/frn-conversions-api - - - methods: - -- getList(stateCode, multi) - takes stateCode=IL or stateCode=17 (FIPS code), - (optional) multi=Yes or multi=No to signify whether to include FRNs also operating outside this state. - - -- getInfo(frn) - takes frn='0017855545' (FRN id) - """ - - - def __init__(self): - apis= [ - ('getList', 'http://data.fcc.gov/api/frn/getList'), - ('getInfo', 'http://data.fcc.gov/api/frn/getInfo')] - - GenericAPI.__init__(self,apis) - - -if __name__ == "__main__": - bb = FRNConversionsAPI() - - x=bb.getList(stateCode='IL') - print type(x) - print len(x) - print x.keys() - - #print x - - print - x=bb.getInfo(frn='0017855545') - print type(x) - print len(x) - print x diff --git a/block_conversion_api.py b/block_conversion_api.py deleted file mode 100644 index cf8c837..0000000 --- a/block_conversion_api.py +++ /dev/null @@ -1,13 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the Block Conversion API provided by the FCC. - -class BlockConversionAPI(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, [("get_block", "http://data.fcc.gov/api/block/find")]) - - -# Sample use of BlockConversionAPI -if __name__ == "__main__": - bc = BlockConversionAPI() - print bc.get_block(lat=41, long=-87) # (Should be San Francisco) \ No newline at end of file diff --git a/broadband_api.py b/broadband_api.py deleted file mode 100644 index 4f8f562..0000000 --- a/broadband_api.py +++ /dev/null @@ -1,15 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the Broadband API provided by the FCC. - -APIS = [("get_data", "http://data.fcc.gov/api/speedtest/find")] - -class BroadbandApi(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, APIS) - - -# Sample use of BroadbandApi -if __name__ == "__main__": - bb = BroadbandApi() - print bb.get_data(latitude=37, longitude=-122) # (Should be San Francisco) \ No newline at end of file diff --git a/build/lib.linux-x86_64-2.6/python-fcc/FRNConversionsAPI.py b/build/lib.linux-x86_64-2.6/python-fcc/FRNConversionsAPI.py deleted file mode 100644 index 87fa5b1..0000000 --- a/build/lib.linux-x86_64-2.6/python-fcc/FRNConversionsAPI.py +++ /dev/null @@ -1,45 +0,0 @@ -from generic_api import * -import urllib,json - - -# Simple Python wrapper around the Broadband API provided by the FCC. - -class FRNConversionsAPI(GenericAPI): - """ - FRNConversionsAPI: - - an API to access information about broadband provides. - - original API: http://reboot.fcc.gov/developer/frn-conversions-api - - - methods: - -- getList(stateCode, multi) - takes stateCode=IL or stateCode=17 (FIPS code), - (optional) multi=Yes or multi=No to signify whether to include FRNs also operating outside this state. - - -- getInfo(frn) - takes frn='0017855545' (FRN id) - """ - - - def __init__(self): - apis= [ - ('getList', 'http://data.fcc.gov/api/frn/getList'), - ('getInfo', 'http://data.fcc.gov/api/frn/getInfo')] - - GenericAPI.__init__(self,apis) - - -if __name__ == "__main__": - bb = FRNConversionsAPI() - - x=bb.getList(stateCode='IL') - print type(x) - print len(x) - print x.keys() - - #print x - - print - x=bb.getInfo(frn='0017855545') - print type(x) - print len(x) - print x diff --git a/build/lib.linux-x86_64-2.6/python-fcc/block_conversion_api.py b/build/lib.linux-x86_64-2.6/python-fcc/block_conversion_api.py deleted file mode 100644 index cf8c837..0000000 --- a/build/lib.linux-x86_64-2.6/python-fcc/block_conversion_api.py +++ /dev/null @@ -1,13 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the Block Conversion API provided by the FCC. - -class BlockConversionAPI(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, [("get_block", "http://data.fcc.gov/api/block/find")]) - - -# Sample use of BlockConversionAPI -if __name__ == "__main__": - bc = BlockConversionAPI() - print bc.get_block(lat=41, long=-87) # (Should be San Francisco) \ No newline at end of file diff --git a/build/lib.linux-x86_64-2.6/python-fcc/broadband_api.py b/build/lib.linux-x86_64-2.6/python-fcc/broadband_api.py deleted file mode 100644 index 4f8f562..0000000 --- a/build/lib.linux-x86_64-2.6/python-fcc/broadband_api.py +++ /dev/null @@ -1,15 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the Broadband API provided by the FCC. - -APIS = [("get_data", "http://data.fcc.gov/api/speedtest/find")] - -class BroadbandApi(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, APIS) - - -# Sample use of BroadbandApi -if __name__ == "__main__": - bb = BroadbandApi() - print bb.get_data(latitude=37, longitude=-122) # (Should be San Francisco) \ No newline at end of file diff --git a/build/lib.linux-x86_64-2.6/python-fcc/generic_api.py b/build/lib.linux-x86_64-2.6/python-fcc/generic_api.py deleted file mode 100644 index d11ed36..0000000 --- a/build/lib.linux-x86_64-2.6/python-fcc/generic_api.py +++ /dev/null @@ -1,130 +0,0 @@ -import urllib -import json - -class NoArgumentsException(Exception): - def __str__(self): - return "No arguments were found." - -class BadJSONException(Exception): - def __str__(self): - return "The returned JSON was invalid." - -class NonexistentStyleException(Exception): - def __str__(self): - return "The requested API style was invalid." - -class MustBeOrderedException(Exception): - def __str__(self): - return "The arguments you pass to the SBA API must be ordered." - - -# Perform requests to generic APIs. - -PHP_STYLE = 0 # &x=1&y=2 -SBA_WEIRD_STYLE = 1 - -class BaseAPIRequest: - def __init__(self, url): - self.url = url - - if self.url.startswith("http://api.sba.gov") or self.url.startswith("api.sba.gov"): - self.api_style = SBA_WEIRD_STYLE - else: - self.api_style = PHP_STYLE - - def __format_url_php_style(self, *ordered_args, **args): - """ - Format the url with the arguments in PHP style. That is, - ?x=5&y=6 - """ - if args is None: raise NoArgumentsException - - args["format"] = "json" #Ask for JSON formatted response - append = "" - - for arg in args: append += str(arg) + "=" + str(args[arg]) + "&" - - append = append[:-1] #Take off last '&' - self.formatted_url = self.url + "?" + append - - def __format_url_weird_style(self, *ordered_args, **args): - """ - Format the url with the arguments in the weird style given by SBA. - arg1/arg2/arg3.json - """ - - append = "" - for arg in ordered_args: append += str(arg) + "/" - append = append[:-1] #Take off last '/' - - - self.formatted_url = self.url + append + ".json" - - # Formats a URL with the provided keyword arguments. - def format_url(self, *ordered_args, **args): - if self.api_style == PHP_STYLE: - self.__format_url_php_style(*ordered_args, **args) - elif self.api_style == SBA_WEIRD_STYLE: - print ordered_args - print args - if len(args) != 0: - raise MustBeOrderedException # MUST be ordered. - - self.__format_url_weird_style(*ordered_args) - else: - raise NonexistentStyleException - - # Requests the API and returns the JSON object. - def request(self, *ordered_args, **args): - self.format_url(*ordered_args, **args) - #print self.formatted_url - t = urllib.urlopen(self.formatted_url).read().strip() - if t.startswith("callback("): - t=t[t.index("(")+1:-1] - - print self.formatted_url - - try: - return json.loads(t) - - except: - raise BadJSONException - return None - - -class GenericAPI: - - """ - __init__ - Parameters: APIS, a list of tuples of form (FUNCTIONNAME, LINK). - - Creates functions of name FUNCTIONNAME that perform an API call to LINK - when called, giving back the response as JSON. - - Returns: Nothing - """ - - def __init__(self, apis): - - self.api_objects = [] - self.api_functions = [] - self.functions = [] - - # Who writes normal functions when you can use CLOSURES?!? - - number = 0 - - # Bind each function to the class. - for api in apis: - self.api_objects.append(BaseAPIRequest(api[1])) - self.bind_closure(number) - setattr(self, api[0], self.api_functions[number]) - number += 1 - - # Creates a function on the current class. - def bind_closure(self, number): - def generic_api_call(*ordered_args, **kwargs): - self.api_objects[number].format_url(*ordered_args, **kwargs) - return self.api_objects[number].request(*ordered_args, **kwargs) - - self.api_functions.append(generic_api_call) \ No newline at end of file diff --git a/build/lib.linux-x86_64-2.6/python-fcc/license_view_api.py b/build/lib.linux-x86_64-2.6/python-fcc/license_view_api.py deleted file mode 100644 index afa9201..0000000 --- a/build/lib.linux-x86_64-2.6/python-fcc/license_view_api.py +++ /dev/null @@ -1,22 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the License View API provided by the FCC. - -APIS = [ ("get_licenses", "http://data.fcc.gov/api/license-view/basicSearch/getLicenses" ) - , ("get_common_names", "http://data.fcc.gov/api/license-view/licenses/getCommonNames") - , ("get_statuses", "http://data.fcc.gov/api/license-view/licenses/getStatuses") - , ("get_categories", "http://data.fcc.gov/api/license-view/licenses/getCategories") - , ("get_entities", "http://data.fcc.gov/api/license-view/licenses/getEntities") - , ("get_renewals", "http://data.fcc.gov/api/license-view/licenses/getRenewals") - , ("get_issued", "http://data.fcc.gov/api/license-view/licenses/getIssued") - ] - - -class LicenseViewAPI(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, APIS) - -# Sample use of BlockConversionAPI -if __name__ == "__main__": - bc = LicenseViewAPI() - print bc.get_licenses(searchValue = "Verizon Wireless") \ No newline at end of file diff --git a/build/lib.linux-x86_64-2.6/python-fcc/sba_businesses_api.py b/build/lib.linux-x86_64-2.6/python-fcc/sba_businesses_api.py deleted file mode 100644 index efcf19b..0000000 --- a/build/lib.linux-x86_64-2.6/python-fcc/sba_businesses_api.py +++ /dev/null @@ -1,33 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the SBA Business API. - -def build_api_list(list, base): - result = [] - for item in list: - result.append((item, base + "/" + item + "/" )) - - return result - - -#These are the function calls that the SBABusinessesAPI object exposes. -list = [ "by_category" - , "all_by_state" - , "by_business_type" - , "state_only" - , "state_and_county" - , "state_and_city" - , "by_zip" - ] - -APIS = build_api_list(list, "http://api.sba.gov/license_permit") - -class SBABusinessesAPI(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, APIS) - - -# Sample use of BroadbandApi -if __name__ == "__main__": - bb = SBABusinessesAPI() - print bb.by_category("doing business as") # (Should be San Francisco) \ No newline at end of file diff --git a/build/lib.linux-x86_64-2.6/python-fcc/sba_loans_grants_api.py b/build/lib.linux-x86_64-2.6/python-fcc/sba_loans_grants_api.py deleted file mode 100644 index 998c312..0000000 --- a/build/lib.linux-x86_64-2.6/python-fcc/sba_loans_grants_api.py +++ /dev/null @@ -1,35 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the SBA Business API. - -def build_api_list(list, base): - result = [] - for item in list: - result.append((item, base + "/" + item + "/" )) - - return result - - -#These are the function calls that the SBABusinessesAPI object exposes. -list = [ "federal" - , "state_financing_for" - , "federal_and_state_financing_for" - # , "nil/for_profit" - # , "nil/for_profit/nil" #What were they thinking?! - # , "nil/for_profit" - # STATE ABBREVIATION/for_profit/nil/SPECIALTY - # STATE ABBREVIATION/for_profit/nil/SPECIALTY1-SPECIALTY2- ... SPECIALTYN - # STATE ABBREVIATION/for_profit/INDUSTRY/SPECIALTY - ] - -APIS = build_api_list(list, "http://api.sba.gov/loans_grants") - -class SBALoansGrantsAPI(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, APIS) - - -# Sample use of BroadbandApi -if __name__ == "__main__": - bb = SBALoansGrantsAPI() - print bb.by_category("doing business as") # (Should be San Francisco) \ No newline at end of file diff --git a/build/lib.linux-x86_64-2.6/python-fcc/tests/__init__.py b/build/lib.linux-x86_64-2.6/python-fcc/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/dist/python_fcc-0.1-py2.6.egg b/dist/python_fcc-0.1-py2.6.egg deleted file mode 100644 index 4362df0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{Q>){!2W@I8}t2*>mvCF?k@`a1NgUi-EW{8`5(Z4MDJe9>u=G! z-=z4zlm5G}eNFmX@a;DVm*OvVdL4>;jrui%-Ub4GqgJT@g8Kg{|LsowH!7Isuc-gF z?~hLZRjaq#+~24K+P|P)H}D^TL(TbuE4uFJpOC{FS5emhjqU z{)%Ay=kfJRWPL^Wn*o1|dTYObqo!Y@{;=k68LzAJ%Y^^u@%2MtdsUtP7<2_`(3hm~ UUsp)60mffWq{UwT2>{^#0V}ad*8l(j diff --git a/generic_api.py b/generic_api.py deleted file mode 100644 index d11ed36..0000000 --- a/generic_api.py +++ /dev/null @@ -1,130 +0,0 @@ -import urllib -import json - -class NoArgumentsException(Exception): - def __str__(self): - return "No arguments were found." - -class BadJSONException(Exception): - def __str__(self): - return "The returned JSON was invalid." - -class NonexistentStyleException(Exception): - def __str__(self): - return "The requested API style was invalid." - -class MustBeOrderedException(Exception): - def __str__(self): - return "The arguments you pass to the SBA API must be ordered." - - -# Perform requests to generic APIs. - -PHP_STYLE = 0 # &x=1&y=2 -SBA_WEIRD_STYLE = 1 - -class BaseAPIRequest: - def __init__(self, url): - self.url = url - - if self.url.startswith("http://api.sba.gov") or self.url.startswith("api.sba.gov"): - self.api_style = SBA_WEIRD_STYLE - else: - self.api_style = PHP_STYLE - - def __format_url_php_style(self, *ordered_args, **args): - """ - Format the url with the arguments in PHP style. That is, - ?x=5&y=6 - """ - if args is None: raise NoArgumentsException - - args["format"] = "json" #Ask for JSON formatted response - append = "" - - for arg in args: append += str(arg) + "=" + str(args[arg]) + "&" - - append = append[:-1] #Take off last '&' - self.formatted_url = self.url + "?" + append - - def __format_url_weird_style(self, *ordered_args, **args): - """ - Format the url with the arguments in the weird style given by SBA. - arg1/arg2/arg3.json - """ - - append = "" - for arg in ordered_args: append += str(arg) + "/" - append = append[:-1] #Take off last '/' - - - self.formatted_url = self.url + append + ".json" - - # Formats a URL with the provided keyword arguments. - def format_url(self, *ordered_args, **args): - if self.api_style == PHP_STYLE: - self.__format_url_php_style(*ordered_args, **args) - elif self.api_style == SBA_WEIRD_STYLE: - print ordered_args - print args - if len(args) != 0: - raise MustBeOrderedException # MUST be ordered. - - self.__format_url_weird_style(*ordered_args) - else: - raise NonexistentStyleException - - # Requests the API and returns the JSON object. - def request(self, *ordered_args, **args): - self.format_url(*ordered_args, **args) - #print self.formatted_url - t = urllib.urlopen(self.formatted_url).read().strip() - if t.startswith("callback("): - t=t[t.index("(")+1:-1] - - print self.formatted_url - - try: - return json.loads(t) - - except: - raise BadJSONException - return None - - -class GenericAPI: - - """ - __init__ - Parameters: APIS, a list of tuples of form (FUNCTIONNAME, LINK). - - Creates functions of name FUNCTIONNAME that perform an API call to LINK - when called, giving back the response as JSON. - - Returns: Nothing - """ - - def __init__(self, apis): - - self.api_objects = [] - self.api_functions = [] - self.functions = [] - - # Who writes normal functions when you can use CLOSURES?!? - - number = 0 - - # Bind each function to the class. - for api in apis: - self.api_objects.append(BaseAPIRequest(api[1])) - self.bind_closure(number) - setattr(self, api[0], self.api_functions[number]) - number += 1 - - # Creates a function on the current class. - def bind_closure(self, number): - def generic_api_call(*ordered_args, **kwargs): - self.api_objects[number].format_url(*ordered_args, **kwargs) - return self.api_objects[number].request(*ordered_args, **kwargs) - - self.api_functions.append(generic_api_call) \ No newline at end of file diff --git a/license_view_api.py b/license_view_api.py deleted file mode 100644 index afa9201..0000000 --- a/license_view_api.py +++ /dev/null @@ -1,22 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the License View API provided by the FCC. - -APIS = [ ("get_licenses", "http://data.fcc.gov/api/license-view/basicSearch/getLicenses" ) - , ("get_common_names", "http://data.fcc.gov/api/license-view/licenses/getCommonNames") - , ("get_statuses", "http://data.fcc.gov/api/license-view/licenses/getStatuses") - , ("get_categories", "http://data.fcc.gov/api/license-view/licenses/getCategories") - , ("get_entities", "http://data.fcc.gov/api/license-view/licenses/getEntities") - , ("get_renewals", "http://data.fcc.gov/api/license-view/licenses/getRenewals") - , ("get_issued", "http://data.fcc.gov/api/license-view/licenses/getIssued") - ] - - -class LicenseViewAPI(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, APIS) - -# Sample use of BlockConversionAPI -if __name__ == "__main__": - bc = LicenseViewAPI() - print bc.get_licenses(searchValue = "Verizon Wireless") \ No newline at end of file diff --git a/python-fcc/__init__.py b/python-fcc/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python-fcc/build/lib.linux-x86_64-2.6/tests/__init__.py b/python-fcc/build/lib.linux-x86_64-2.6/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python-fcc/build/lib.linux-x86_64-2.6/tests/__main__.py b/python-fcc/build/lib.linux-x86_64-2.6/tests/__main__.py deleted file mode 100644 index 19b9936..0000000 --- a/python-fcc/build/lib.linux-x86_64-2.6/tests/__main__.py +++ /dev/null @@ -1,5 +0,0 @@ -from tests.testcases import * -from tests.testutils import * - -if __name__ == '__main__': - unittest.main() diff --git a/python-fcc/build/lib.linux-x86_64-2.6/tests/testcases.py b/python-fcc/build/lib.linux-x86_64-2.6/tests/testcases.py deleted file mode 100644 index 79df288..0000000 --- a/python-fcc/build/lib.linux-x86_64-2.6/tests/testcases.py +++ /dev/null @@ -1,105 +0,0 @@ -import sys -import unittest - -sys.path.append('../') - -from broadband_api import * -from FRNConversionsAPI import * -from block_conversion_api import * - -class TestBroadbandAPI (unittest.TestCase): - def setUp(self): - self.bb = BroadbandApi() - self.frnapi = FRNConversionsAPI() - - - #Sweep across the US and compare to precomputed values. - def test_Sweep(self): - - # The following is how I computed the values beforehand: - - # print "results = " - # print "[", - # for x in range(10): - # print self.bb.request(latitude=41, longitude=-86 + x * 10)['status'] == 'OK', ",", - # print "]" - results = [ True , True , False , False , False , False , False , False , False , False , ] - - for x in range(10): - self.assertTrue((self.bb.get_data(latitude=41, longitude=-86 + x * 10)['status'] == 'OK') == results[x]) - - - # Does SF exist? - def test_SF(self): - result = self.bb.get_data(latitude=37, longitude=-122) - - self.assertTrue(result['status'] == 'OK') - self.assertTrue('SpeedTestCounty' in result) - - # Does Chicago exist? - def test_Chicago(self): - result = self.bb.get_data(latitude=41, longitude=-87) - - self.assertTrue(result['status'] == 'OK') - - - # Test the middle of nowhere (Disclaimer: I have no idea where - # this is, so it may not be in the middle of nowhere) - def test_Nowhere(self): - result = self.bb.get_data(latitude=35, longitude=35) - - self.assertTrue(result['status'] == 'Fail') - - def test_FRN(self): - result = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(result['Info']['frn'] == '0017855545') - - def test_companyName(self): - result = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(result['Info']['companyName']=='Cygnus Telecommunications Corporation') - - def test_FRNapiIsDict(self): - result1 = self.frnapi.getList(stateCode='IL') - result2 = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(type(result1)==type({}) and type(result2)==type({})) - def test_CygnusInIL(self): - result = self.frnapi.getList(stateCode='IL') - #print result['Frns'] - #Cygnus Telecommunications Corporation - self.assertTrue('Cygnus Telecommunications Corporation' in [x['companyName'] for x in result['Frns']['Frn']]) - - - - - - - -class TestBlockConversionAPI (unittest.TestCase): - def setUp(self): - self.bb = BlockConversionAPI() - - # Does SF exist? - def test_SF(self): - result = self.bb.get_block(latitude=37, longitude=-122) - - self.assertTrue(result['status'] == 'OK') - self.assertTrue(result['State']['code'] == 'CA') - self.assertTrue(result['Block']['FIPS'] == '060871001001002C') - - - # Does (somewhere near) Chicago exist? - def test_Chicago(self): - result = self.bb.get_block(latitude=41, longitude=-87) - - self.assertTrue(result['Block']['FIPS'] == '180739908004112') - - - # Test the middle of nowhere (Disclaimer: I have no idea where - # this is, so it may not be in the middle of nowhere) - def test_Nowhere(self): - result = self.bb.get_block(latitude=35, longitude=35) - - self.assertTrue(result['status'] == 'Fail') - -if __name__ == '__main__': - unittest.main() diff --git a/python-fcc/dist/python_fcc-0.1-py2.6.egg b/python-fcc/dist/python_fcc-0.1-py2.6.egg deleted file mode 100644 index 846f12820f9f9fb6a61eabb8f1b0bd1a6f512287..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info/PKG-INFO deleted file mode 100644 index bd3636d..0000000 --- a/python-fcc/python_fcc.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: python-fcc -Version: 0.1 -Summary: An API abstraction of the FCC API found at http://reboot.fcc.gov/developer -Home-page: http://github.com/codeforamerica/FCC-Python-Egg -Author: johnfn, quadrismegistus -Author-email: grantm@stanford.edu, heuser@stanford.edu -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/python-fcc/python_fcc.egg-info/SOURCES.txt b/python-fcc/python_fcc.egg-info/SOURCES.txt deleted file mode 100644 index 0717a3d..0000000 --- a/python-fcc/python_fcc.egg-info/SOURCES.txt +++ /dev/null @@ -1,8 +0,0 @@ -setup.py -python_fcc.egg-info/PKG-INFO -python_fcc.egg-info/SOURCES.txt -python_fcc.egg-info/dependency_links.txt -python_fcc.egg-info/top_level.txt -tests/__init__.py -tests/__main__.py -tests/testcases.py \ No newline at end of file diff --git a/python-fcc/python_fcc.egg-info/dependency_links.txt b/python-fcc/python_fcc.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/python-fcc/python_fcc.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python-fcc/python_fcc.egg-info/top_level.txt b/python-fcc/python_fcc.egg-info/top_level.txt deleted file mode 100644 index 2b29f27..0000000 --- a/python-fcc/python_fcc.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -tests diff --git a/python-fcc/tests/__init__.py b/python-fcc/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python-fcc/tests/__main__.py b/python-fcc/tests/__main__.py deleted file mode 100644 index 19b9936..0000000 --- a/python-fcc/tests/__main__.py +++ /dev/null @@ -1,5 +0,0 @@ -from tests.testcases import * -from tests.testutils import * - -if __name__ == '__main__': - unittest.main() diff --git a/python-fcc/tests/testcases.py b/python-fcc/tests/testcases.py deleted file mode 100644 index 79df288..0000000 --- a/python-fcc/tests/testcases.py +++ /dev/null @@ -1,105 +0,0 @@ -import sys -import unittest - -sys.path.append('../') - -from broadband_api import * -from FRNConversionsAPI import * -from block_conversion_api import * - -class TestBroadbandAPI (unittest.TestCase): - def setUp(self): - self.bb = BroadbandApi() - self.frnapi = FRNConversionsAPI() - - - #Sweep across the US and compare to precomputed values. - def test_Sweep(self): - - # The following is how I computed the values beforehand: - - # print "results = " - # print "[", - # for x in range(10): - # print self.bb.request(latitude=41, longitude=-86 + x * 10)['status'] == 'OK', ",", - # print "]" - results = [ True , True , False , False , False , False , False , False , False , False , ] - - for x in range(10): - self.assertTrue((self.bb.get_data(latitude=41, longitude=-86 + x * 10)['status'] == 'OK') == results[x]) - - - # Does SF exist? - def test_SF(self): - result = self.bb.get_data(latitude=37, longitude=-122) - - self.assertTrue(result['status'] == 'OK') - self.assertTrue('SpeedTestCounty' in result) - - # Does Chicago exist? - def test_Chicago(self): - result = self.bb.get_data(latitude=41, longitude=-87) - - self.assertTrue(result['status'] == 'OK') - - - # Test the middle of nowhere (Disclaimer: I have no idea where - # this is, so it may not be in the middle of nowhere) - def test_Nowhere(self): - result = self.bb.get_data(latitude=35, longitude=35) - - self.assertTrue(result['status'] == 'Fail') - - def test_FRN(self): - result = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(result['Info']['frn'] == '0017855545') - - def test_companyName(self): - result = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(result['Info']['companyName']=='Cygnus Telecommunications Corporation') - - def test_FRNapiIsDict(self): - result1 = self.frnapi.getList(stateCode='IL') - result2 = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(type(result1)==type({}) and type(result2)==type({})) - def test_CygnusInIL(self): - result = self.frnapi.getList(stateCode='IL') - #print result['Frns'] - #Cygnus Telecommunications Corporation - self.assertTrue('Cygnus Telecommunications Corporation' in [x['companyName'] for x in result['Frns']['Frn']]) - - - - - - - -class TestBlockConversionAPI (unittest.TestCase): - def setUp(self): - self.bb = BlockConversionAPI() - - # Does SF exist? - def test_SF(self): - result = self.bb.get_block(latitude=37, longitude=-122) - - self.assertTrue(result['status'] == 'OK') - self.assertTrue(result['State']['code'] == 'CA') - self.assertTrue(result['Block']['FIPS'] == '060871001001002C') - - - # Does (somewhere near) Chicago exist? - def test_Chicago(self): - result = self.bb.get_block(latitude=41, longitude=-87) - - self.assertTrue(result['Block']['FIPS'] == '180739908004112') - - - # Test the middle of nowhere (Disclaimer: I have no idea where - # this is, so it may not be in the middle of nowhere) - def test_Nowhere(self): - result = self.bb.get_block(latitude=35, longitude=35) - - self.assertTrue(result['status'] == 'Fail') - -if __name__ == '__main__': - unittest.main() diff --git a/python_fcc.egg-info/PKG-INFO b/python_fcc.egg-info/PKG-INFO deleted file mode 100644 index bd3636d..0000000 --- a/python_fcc.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: python-fcc -Version: 0.1 -Summary: An API abstraction of the FCC API found at http://reboot.fcc.gov/developer -Home-page: http://github.com/codeforamerica/FCC-Python-Egg -Author: johnfn, quadrismegistus -Author-email: grantm@stanford.edu, heuser@stanford.edu -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/python_fcc.egg-info/SOURCES.txt b/python_fcc.egg-info/SOURCES.txt deleted file mode 100644 index f08a8d9..0000000 --- a/python_fcc.egg-info/SOURCES.txt +++ /dev/null @@ -1,16 +0,0 @@ -setup.py -python-fcc/FRNConversionsAPI.py -python-fcc/__init__.py -python-fcc/block_conversion_api.py -python-fcc/broadband_api.py -python-fcc/generic_api.py -python-fcc/license_view_api.py -python-fcc/sba_businesses_api.py -python-fcc/sba_loans_grants_api.py -python-fcc/tests/__init__.py -python-fcc/tests/__main__.py -python-fcc/tests/testcases.py -python_fcc.egg-info/PKG-INFO -python_fcc.egg-info/SOURCES.txt -python_fcc.egg-info/dependency_links.txt -python_fcc.egg-info/top_level.txt \ No newline at end of file diff --git a/python_fcc.egg-info/dependency_links.txt b/python_fcc.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/python_fcc.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python_fcc.egg-info/top_level.txt b/python_fcc.egg-info/top_level.txt deleted file mode 100644 index c79c61a..0000000 --- a/python_fcc.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -python-fcc diff --git a/python-fcc/FRNConversionsAPI.py b/python_fcc/FRNConversionsAPI.py similarity index 100% rename from python-fcc/FRNConversionsAPI.py rename to python_fcc/FRNConversionsAPI.py diff --git a/__init__.py b/python_fcc/__init__.py similarity index 100% rename from __init__.py rename to python_fcc/__init__.py diff --git a/python-fcc/block_conversion_api.py b/python_fcc/block_conversion_api.py similarity index 100% rename from python-fcc/block_conversion_api.py rename to python_fcc/block_conversion_api.py diff --git a/python-fcc/broadband_api.py b/python_fcc/broadband_api.py similarity index 100% rename from python-fcc/broadband_api.py rename to python_fcc/broadband_api.py diff --git a/python-fcc/generic_api.py b/python_fcc/generic_api.py similarity index 100% rename from python-fcc/generic_api.py rename to python_fcc/generic_api.py diff --git a/python-fcc/license_view_api.py b/python_fcc/license_view_api.py similarity index 100% rename from python-fcc/license_view_api.py rename to python_fcc/license_view_api.py diff --git a/python-fcc/sba_businesses_api.py b/python_fcc/sba_businesses_api.py similarity index 100% rename from python-fcc/sba_businesses_api.py rename to python_fcc/sba_businesses_api.py diff --git a/python-fcc/sba_loans_grants_api.py b/python_fcc/sba_loans_grants_api.py similarity index 100% rename from python-fcc/sba_loans_grants_api.py rename to python_fcc/sba_loans_grants_api.py diff --git a/build/lib.linux-x86_64-2.6/python-fcc/__init__.py b/python_fcc/tests/__init__.py similarity index 100% rename from build/lib.linux-x86_64-2.6/python-fcc/__init__.py rename to python_fcc/tests/__init__.py diff --git a/build/lib.linux-x86_64-2.6/python-fcc/tests/__main__.py b/python_fcc/tests/__main__.py similarity index 100% rename from build/lib.linux-x86_64-2.6/python-fcc/tests/__main__.py rename to python_fcc/tests/__main__.py diff --git a/build/lib.linux-x86_64-2.6/python-fcc/tests/testcases.py b/python_fcc/tests/testcases.py similarity index 100% rename from build/lib.linux-x86_64-2.6/python-fcc/tests/testcases.py rename to python_fcc/tests/testcases.py diff --git a/sba_businesses_api.py b/sba_businesses_api.py deleted file mode 100644 index efcf19b..0000000 --- a/sba_businesses_api.py +++ /dev/null @@ -1,33 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the SBA Business API. - -def build_api_list(list, base): - result = [] - for item in list: - result.append((item, base + "/" + item + "/" )) - - return result - - -#These are the function calls that the SBABusinessesAPI object exposes. -list = [ "by_category" - , "all_by_state" - , "by_business_type" - , "state_only" - , "state_and_county" - , "state_and_city" - , "by_zip" - ] - -APIS = build_api_list(list, "http://api.sba.gov/license_permit") - -class SBABusinessesAPI(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, APIS) - - -# Sample use of BroadbandApi -if __name__ == "__main__": - bb = SBABusinessesAPI() - print bb.by_category("doing business as") # (Should be San Francisco) \ No newline at end of file diff --git a/sba_loans_grants_api.py b/sba_loans_grants_api.py deleted file mode 100644 index 998c312..0000000 --- a/sba_loans_grants_api.py +++ /dev/null @@ -1,35 +0,0 @@ -from generic_api import * - -# Simple Python wrapper around the SBA Business API. - -def build_api_list(list, base): - result = [] - for item in list: - result.append((item, base + "/" + item + "/" )) - - return result - - -#These are the function calls that the SBABusinessesAPI object exposes. -list = [ "federal" - , "state_financing_for" - , "federal_and_state_financing_for" - # , "nil/for_profit" - # , "nil/for_profit/nil" #What were they thinking?! - # , "nil/for_profit" - # STATE ABBREVIATION/for_profit/nil/SPECIALTY - # STATE ABBREVIATION/for_profit/nil/SPECIALTY1-SPECIALTY2- ... SPECIALTYN - # STATE ABBREVIATION/for_profit/INDUSTRY/SPECIALTY - ] - -APIS = build_api_list(list, "http://api.sba.gov/loans_grants") - -class SBALoansGrantsAPI(GenericAPI): - def __init__(self): - GenericAPI.__init__(self, APIS) - - -# Sample use of BroadbandApi -if __name__ == "__main__": - bb = SBALoansGrantsAPI() - print bb.by_category("doing business as") # (Should be San Francisco) \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/__main__.py b/tests/__main__.py deleted file mode 100644 index 19b9936..0000000 --- a/tests/__main__.py +++ /dev/null @@ -1,5 +0,0 @@ -from tests.testcases import * -from tests.testutils import * - -if __name__ == '__main__': - unittest.main() diff --git a/tests/testcases.py b/tests/testcases.py deleted file mode 100644 index 79df288..0000000 --- a/tests/testcases.py +++ /dev/null @@ -1,105 +0,0 @@ -import sys -import unittest - -sys.path.append('../') - -from broadband_api import * -from FRNConversionsAPI import * -from block_conversion_api import * - -class TestBroadbandAPI (unittest.TestCase): - def setUp(self): - self.bb = BroadbandApi() - self.frnapi = FRNConversionsAPI() - - - #Sweep across the US and compare to precomputed values. - def test_Sweep(self): - - # The following is how I computed the values beforehand: - - # print "results = " - # print "[", - # for x in range(10): - # print self.bb.request(latitude=41, longitude=-86 + x * 10)['status'] == 'OK', ",", - # print "]" - results = [ True , True , False , False , False , False , False , False , False , False , ] - - for x in range(10): - self.assertTrue((self.bb.get_data(latitude=41, longitude=-86 + x * 10)['status'] == 'OK') == results[x]) - - - # Does SF exist? - def test_SF(self): - result = self.bb.get_data(latitude=37, longitude=-122) - - self.assertTrue(result['status'] == 'OK') - self.assertTrue('SpeedTestCounty' in result) - - # Does Chicago exist? - def test_Chicago(self): - result = self.bb.get_data(latitude=41, longitude=-87) - - self.assertTrue(result['status'] == 'OK') - - - # Test the middle of nowhere (Disclaimer: I have no idea where - # this is, so it may not be in the middle of nowhere) - def test_Nowhere(self): - result = self.bb.get_data(latitude=35, longitude=35) - - self.assertTrue(result['status'] == 'Fail') - - def test_FRN(self): - result = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(result['Info']['frn'] == '0017855545') - - def test_companyName(self): - result = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(result['Info']['companyName']=='Cygnus Telecommunications Corporation') - - def test_FRNapiIsDict(self): - result1 = self.frnapi.getList(stateCode='IL') - result2 = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(type(result1)==type({}) and type(result2)==type({})) - def test_CygnusInIL(self): - result = self.frnapi.getList(stateCode='IL') - #print result['Frns'] - #Cygnus Telecommunications Corporation - self.assertTrue('Cygnus Telecommunications Corporation' in [x['companyName'] for x in result['Frns']['Frn']]) - - - - - - - -class TestBlockConversionAPI (unittest.TestCase): - def setUp(self): - self.bb = BlockConversionAPI() - - # Does SF exist? - def test_SF(self): - result = self.bb.get_block(latitude=37, longitude=-122) - - self.assertTrue(result['status'] == 'OK') - self.assertTrue(result['State']['code'] == 'CA') - self.assertTrue(result['Block']['FIPS'] == '060871001001002C') - - - # Does (somewhere near) Chicago exist? - def test_Chicago(self): - result = self.bb.get_block(latitude=41, longitude=-87) - - self.assertTrue(result['Block']['FIPS'] == '180739908004112') - - - # Test the middle of nowhere (Disclaimer: I have no idea where - # this is, so it may not be in the middle of nowhere) - def test_Nowhere(self): - result = self.bb.get_block(latitude=35, longitude=35) - - self.assertTrue(result['status'] == 'Fail') - -if __name__ == '__main__': - unittest.main() From c27c5eb7587a700fe1efc5c1dc7a0e149f0e9821 Mon Sep 17 00:00:00 2001 From: James Downs Date: Sat, 16 Mar 2019 06:52:09 -0700 Subject: [PATCH 3/5] bump semantic ver, fix library calls, add build directories to .gitignore --- .gitignore | 3 +++ python_fcc/generic_api.py | 4 ++-- python_fcc/license_view_api.py | 2 +- setup.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0d20b64..196b3c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ *.pyc +build/ +dist/ +python_fcc.egg-info/ diff --git a/python_fcc/generic_api.py b/python_fcc/generic_api.py index 78033e4..90b3990 100644 --- a/python_fcc/generic_api.py +++ b/python_fcc/generic_api.py @@ -78,8 +78,8 @@ def format_url(self, *ordered_args, **args): def request(self, *ordered_args, **args): self.format_url(*ordered_args, **args) #print self.formatted_url - t = urllib.urlopen(self.formatted_url).read().strip() - if t.startswith("callback("): + t = urllib.request.urlopen(self.formatted_url).read().strip() + if t.startswith(b"callback("): t=t[t.index("(")+1:-1] print(self.formatted_url) diff --git a/python_fcc/license_view_api.py b/python_fcc/license_view_api.py index 8878583..3e74e92 100644 --- a/python_fcc/license_view_api.py +++ b/python_fcc/license_view_api.py @@ -1,4 +1,4 @@ -from generic_api import * +from .generic_api import * # Simple Python wrapper around the License View API provided by the FCC. diff --git a/setup.py b/setup.py index c72156e..cdb4397 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup( name = "python-fcc", - version = "0.1", + version = "0.1.1", description = "An API abstraction of the FCC API found at http://reboot.fcc.gov/developer", author='johnfn, quadrismegistus', author_email='grantm@stanford.edu, heuser@stanford.edu', From 2ac9b4668d03e9248f359b6ba4924ad7ec956d75 Mon Sep 17 00:00:00 2001 From: James Downs Date: Sat, 16 Mar 2019 09:37:20 -0700 Subject: [PATCH 4/5] Move tests to top level --- {python_fcc/tests => tests}/__init__.py | 0 {python_fcc/tests => tests}/__main__.py | 0 {python_fcc/tests => tests}/testcases.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {python_fcc/tests => tests}/__init__.py (100%) rename {python_fcc/tests => tests}/__main__.py (100%) rename {python_fcc/tests => tests}/testcases.py (100%) diff --git a/python_fcc/tests/__init__.py b/tests/__init__.py similarity index 100% rename from python_fcc/tests/__init__.py rename to tests/__init__.py diff --git a/python_fcc/tests/__main__.py b/tests/__main__.py similarity index 100% rename from python_fcc/tests/__main__.py rename to tests/__main__.py diff --git a/python_fcc/tests/testcases.py b/tests/testcases.py similarity index 100% rename from python_fcc/tests/testcases.py rename to tests/testcases.py From fd98bbb762062943cba09999d25fa8ad9acf8cf7 Mon Sep 17 00:00:00 2001 From: James Downs Date: Sat, 16 Mar 2019 11:19:32 -0700 Subject: [PATCH 5/5] Broadband API has been discontinued. Other corrections for data changes --- tests/__main__.py | 7 ++- tests/testcases.py | 131 ++++++++++++++++----------------------------- 2 files changed, 49 insertions(+), 89 deletions(-) diff --git a/tests/__main__.py b/tests/__main__.py index 19b9936..3bbb2df 100644 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -1,5 +1,4 @@ -from tests.testcases import * -from tests.testutils import * +from .testcases import * -if __name__ == '__main__': - unittest.main() +if __name__ == "__main__": + unittest.main() diff --git a/tests/testcases.py b/tests/testcases.py index 79df288..9686ec2 100644 --- a/tests/testcases.py +++ b/tests/testcases.py @@ -1,105 +1,66 @@ import sys import unittest -sys.path.append('../') +from python_fcc.broadband_api import * +from python_fcc.FRNConversionsAPI import * +from python_fcc.block_conversion_api import * -from broadband_api import * -from FRNConversionsAPI import * -from block_conversion_api import * -class TestBroadbandAPI (unittest.TestCase): - def setUp(self): - self.bb = BroadbandApi() - self.frnapi = FRNConversionsAPI() - +class TestBroadbandAPI(unittest.TestCase): + def setUp(self): + self.bb = BroadbandApi() + self.frnapi = FRNConversionsAPI() - #Sweep across the US and compare to precomputed values. - def test_Sweep(self): + def test_FRN(self): + result = self.frnapi.getInfo(frn="0016095838") + self.assertTrue(result["Results"][0]["frn"] == "0016095838") - # The following is how I computed the values beforehand: + def test_companyName(self): + result = self.frnapi.getInfo(frn="0016095838") + self.assertTrue( + result["Results"][0]["companyName"] == "Cygnus Communications Corporation" + ) - # print "results = " - # print "[", - # for x in range(10): - # print self.bb.request(latitude=41, longitude=-86 + x * 10)['status'] == 'OK', ",", - # print "]" - results = [ True , True , False , False , False , False , False , False , False , False , ] + def test_FRNapiIsDict(self): + result1 = self.frnapi.getList(stateCode="IL") + result2 = self.frnapi.getInfo(frn="0016095838") + self.assertTrue(type(result1) == type({}) and type(result2) == type({})) - for x in range(10): - self.assertTrue((self.bb.get_data(latitude=41, longitude=-86 + x * 10)['status'] == 'OK') == results[x]) + def test_CygnusInIL(self): + result = self.frnapi.getList(stateCode="IL") + # print result['Frns'] + # Cygnus Telecommunications Corporation + self.assertTrue( + "Cygnus Communications Corporation" + in [x["companyName"] for x in result["Results"]] + ) - # Does SF exist? - def test_SF(self): - result = self.bb.get_data(latitude=37, longitude=-122) +class TestBlockConversionAPI(unittest.TestCase): + def setUp(self): + self.bb = BlockConversionAPI() - self.assertTrue(result['status'] == 'OK') - self.assertTrue('SpeedTestCounty' in result) - - # Does Chicago exist? - def test_Chicago(self): - result = self.bb.get_data(latitude=41, longitude=-87) + # Does SF exist? (Really, more Santa Cruz) + def test_SF(self): + result = self.bb.get_block(latitude=37, longitude=-122) - self.assertTrue(result['status'] == 'OK') + self.assertTrue(result["status"] == "OK") + self.assertTrue(result["State"]["code"] == "CA") + self.assertTrue(result["Block"]["FIPS"] == "060871001001003") + # Does (somewhere near) Chicago exist? (Jasper, IN) + def test_Chicago(self): + result = self.bb.get_block(latitude=41, longitude=-87) - # Test the middle of nowhere (Disclaimer: I have no idea where - # this is, so it may not be in the middle of nowhere) - def test_Nowhere(self): - result = self.bb.get_data(latitude=35, longitude=35) - - self.assertTrue(result['status'] == 'Fail') + self.assertTrue(result["Block"]["FIPS"] == "180731008003098") - def test_FRN(self): - result = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(result['Info']['frn'] == '0017855545') + # Test the middle of nowhere (Disclaimer: I have no idea where + # this is, so it may not be in the middle of nowhere) + def test_Nowhere(self): + result = self.bb.get_block(latitude=35, longitude=35) - def test_companyName(self): - result = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(result['Info']['companyName']=='Cygnus Telecommunications Corporation') - - def test_FRNapiIsDict(self): - result1 = self.frnapi.getList(stateCode='IL') - result2 = self.frnapi.getInfo(frn='0017855545') - self.assertTrue(type(result1)==type({}) and type(result2)==type({})) - def test_CygnusInIL(self): - result = self.frnapi.getList(stateCode='IL') - #print result['Frns'] - #Cygnus Telecommunications Corporation - self.assertTrue('Cygnus Telecommunications Corporation' in [x['companyName'] for x in result['Frns']['Frn']]) + self.assertTrue(result["Block"]["FIPS"] == None) - - - - - -class TestBlockConversionAPI (unittest.TestCase): - def setUp(self): - self.bb = BlockConversionAPI() - - # Does SF exist? - def test_SF(self): - result = self.bb.get_block(latitude=37, longitude=-122) - - self.assertTrue(result['status'] == 'OK') - self.assertTrue(result['State']['code'] == 'CA') - self.assertTrue(result['Block']['FIPS'] == '060871001001002C') - - - # Does (somewhere near) Chicago exist? - def test_Chicago(self): - result = self.bb.get_block(latitude=41, longitude=-87) - - self.assertTrue(result['Block']['FIPS'] == '180739908004112') - - - # Test the middle of nowhere (Disclaimer: I have no idea where - # this is, so it may not be in the middle of nowhere) - def test_Nowhere(self): - result = self.bb.get_block(latitude=35, longitude=35) - - self.assertTrue(result['status'] == 'Fail') - -if __name__ == '__main__': +if __name__ == "__main__": unittest.main()