From a83ba600a4243656e45ae463d3d4020ab897b7c0 Mon Sep 17 00:00:00 2001 From: Scrumpy Date: Sun, 19 Feb 2023 00:27:19 +0000 Subject: [PATCH] added v1.0.10 --- git-versions/pygeolocate-1.0.10.zip | Bin 0 -> 21763 bytes git-versions/pygeolocate-1.0.10/__init__.py | 33 +++ .../pygeolocate-1.0.10/countries_csv.py | 267 ++++++++++++++++++ .../examples/get_country_by_full_name.py | 9 + .../examples/get_country_by_partial_name.py | 8 + .../pygeolocate-1.0.10/pygeolocate.py | 86 ++++++ git-versions/pygeolocate-1.0.10/structures.py | 90 ++++++ 7 files changed, 493 insertions(+) create mode 100644 git-versions/pygeolocate-1.0.10.zip create mode 100644 git-versions/pygeolocate-1.0.10/__init__.py create mode 100644 git-versions/pygeolocate-1.0.10/countries_csv.py create mode 100644 git-versions/pygeolocate-1.0.10/examples/get_country_by_full_name.py create mode 100644 git-versions/pygeolocate-1.0.10/examples/get_country_by_partial_name.py create mode 100644 git-versions/pygeolocate-1.0.10/pygeolocate.py create mode 100644 git-versions/pygeolocate-1.0.10/structures.py diff --git a/git-versions/pygeolocate-1.0.10.zip b/git-versions/pygeolocate-1.0.10.zip new file mode 100644 index 0000000000000000000000000000000000000000..99e104abeefd86a401e0abf58354b558629432ce GIT binary patch literal 21763 zcmagEW2`Vd6lQyD+qP}nwr$(CZQHhOyvMd}>wY)6cQP}XWcsUVvVXO!JAJwoq=7+D z0000W0Ca(r)tuGTj_-f~0FXcd0Py}>b?`JdwYRZ1HgqwiWu#-EV`QM$*SEB@bkWzR zbMQ1(k+m;oK3K2bR%tiN_Rk9Q!|=~T6? zt{XNey%yvymj&MxEUwwaGqj(ctL6&JRfU>?t14^pMh#|Ha1%dIb%kKi*1wc<_ogTm z+F%$^+9QZ(=Kj;t3SD7Mnah+)mw;%k3po`OT#k2+^!ZlJ zTdt$rMr*U;X;u-9OvjJaRC33o*H5Q?9*YawkCkfx3=QYWMxU2)OyHz3d966}4nvf7 z#2IxUi4tw23!o;E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Iho9p2{?6$`{!WJYmz!)X})_d%isSg zd$$wW=a-#-0RLJyP15HAo+?657R`BO=pUTF7R}MWApMV`^hECYmEs9W9r%CCJwtM) zZamF%UPX7p<0Eq}K<)zW9-&hBzf;HseK!kt List[Dict[str, Any]]: + return [ + { + 'code': country_data.split(",")[0], + 'name': country_data.split(",")[3], + 'coordinates': { + 'latitude': country_data.split(",")[1], + 'longitude': country_data.split(",")[2], + }, + } for country_data in countries_csv_data.split("\n") + ] + +def locate_by_name(country_name: str) -> List[Country]: + """ + Returns a list of all possible countries that the `country_name` could reference. + + e.g. "United Kingdom" returns 1 entry as there is only one country called that. + Whereas just "United" would return 3 entries (United Kingdom, United States, United Arab Emirates). + """ + + countries = _get_raw_country_data() + + return [ + Country( + country['code'], + country['name'], + Coordinates( + country['coordinates']['latitude'], + country['coordinates']['longitude'], + ), + ) for country in countries if country_name.lower().replace(" ", "") in country['name'].lower().replace(" ", "") + ] + +def locate_by_code(country_code: str) -> Optional[Country]: + """ + Returns `None` if `country_code` is invalid, else it returns a `Country` object. + """ + + countries = _get_raw_country_data() + + for country in countries: + if country['code'].lower() == country_code.lower(): + return Country( + country['code'], + country['name'], + Coordinates( + country['coordinates']['latitude'], + country['coordinates']['longitude'], + ), + ) + + return None diff --git a/git-versions/pygeolocate-1.0.10/structures.py b/git-versions/pygeolocate-1.0.10/structures.py new file mode 100644 index 0000000..02930db --- /dev/null +++ b/git-versions/pygeolocate-1.0.10/structures.py @@ -0,0 +1,90 @@ +""" +MIT License +Copyright (c) 2023-present Scrumpy (Isabelle) +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + +from typing import ( + Tuple, + Union, + overload, +) + +class Coordinates: + def __init__(self, latitude: float, longitude: float) -> None: + self._latitude = latitude + self._longitude = longitude + + @property + def latitude(self) -> float: + return self._latitude + + @property + def longitude(self) -> float: + return self._longitude + + @overload + def __getitem__(self, item: int) -> float: ... + + @overload + def __getitem__(self, item: str) -> float: ... + + def __getitem__(self, item: Union[int, str]) -> float: + if not isinstance(item, (int, str)): # type: ignore + raise TypeError("Index must be either an int or a str.") + + if isinstance(item, int): + if item == 0: + return self._latitude + elif item == 1: + return self._longitude + else: + raise IndexError("Index out of range, needs to be either 0 or 1.") + + if item.lower() in ["lat", "latitude"]: + return self._latitude + elif item.lower() in ["long", "longitude"]: + return self._longitude + else: + raise ValueError("Item not found.") + + def __tuple__(self) -> Tuple[float, float]: + return (self._latitude, self._longitude) + + def __str__(self) -> str: + return f"{self._latitude}, {self._longitude}" + +class Country: + def __init__(self, country_code: str, country_name: str, coordinates: Coordinates) -> None: + self._country_code = country_code + self._country_name = country_name + self._coordinates = coordinates + + @property + def coordinates(self) -> Coordinates: + return self._coordinates + + @property + def name(self) -> str: + return self._country_name + + @property + def code(self) -> str: + return self._country_code + + def __str__(self) -> str: + return f"{self._country_code} : {self._country_name}"