porimol / countryinfo

A python module for returning data about countries, ISO info and states/provinces within them.
MIT License
143 stars 44 forks source link

A way to get back all available countries? #24

Open ieshaan12 opened 3 years ago

ieshaan12 commented 3 years ago

As the title says. If not we can have another function say that. Probably a separate json file with all country names.

ieshaan12 commented 3 years ago

Function .all() brings back way too much, instead of that, possibly a simpler list with all country names should do.

dpfinch commented 3 years ago

Added to this - could this be filtered by keywords such as region? So you could get a list of all the countries in a continent for instance?

nicolaoe commented 3 years ago

Function .all() brings back way too much, instead of that, possibly a simpler list with all country names should do.

You can list only the keys of the dictionary from .all(), e.g. with CountryInfo().all().keys()