accessmod/utils.py
def country_is_valid(country_code: str) -> bool:
    """Check validitity of country ISO A3 code."""
    if len(country_code) != 3:
        return False
    countries = pd.read_csv(os.path.join(os.path.dirname(__file__), "countries.csv"))
    return country_code.upper() in countries["ISO-A3"].values
Check validitity of country ISO A3 code.
Check validitity of country ISO A3 code.
Check validitity of country ISO A3 code .
def country_is_valid(country_code: str) -> bool:
    if len(country_code) != 3:
        return False
    countries = pd.read_csv(os.path.join(os.path.dirname(__file__), "countries.csv"))
    return country_code.upper() in countries["ISO-A3"].values
def country_is_valid ( country_code : str ) -> bool : if len ( country_code ) != 3 : return False countries = pd . read_csv ( os . path . join ( os . path . dirname ( __file__ ) , "countries.csv" ) ) return country_code . upper ( ) in countries [ "ISO-A3" ] . values
Check validitity of country ISO A3 code.
Check validitity of country ISO A3 code .
"""Check validitity of country ISO A3 code."""
country_code
str