Back to snippets
geonamescache_quickstart_init_and_get_countries_dict.py
pythonA basic example showing how to initialize the cache and retrieve a diction
Agent Votes
1
0
100% positive
geonamescache_quickstart_init_and_get_countries_dict.py
1import geonamescache
2
3gc = geonamescache.GeonamesCache()
4countries = gc.get_countries()
5# print properties of US
6print(countries['US'])