yaph / geonamescache

geonamescache - a Python library for quick access to a subset of GeoNames data.
https://pypi.org/project/geonamescache/
MIT License
99 stars 38 forks source link

Case insensitive search in search_cities function #27

Closed pigden closed 2 years ago

pigden commented 2 years ago

Adding the functionality to do case insensitive search in the search_cities function.

If using python3 the function used during comparison will be casefold. In python2 the function used during comparison will be lower.

Kept the functionality that if it is a string field it will partially match but if it is a list it requires an exact match.

yaph commented 2 years ago

Looks good to me. Thank you for your contribution!