Python API Wrapper for restcountries.eu
Project description
This is a simple python wrapper for the API of http://restcountries.eu <http://restcountries.eu>. If there are any issues, please use this repository to contact me about it.
Installation
pip install python-restcountries
Usage
Just import the API Wrapper and start using it!:
from restcountries import RestCountryApi as rapi def foo(name): country_list = rapi.get_countries_by_name('France')
The Country object
The API returns Country objects or a list of Country objects. Through the country objects one is able to access following attributes.:
country = country_list[0] print(country.name) France
top_level_domain
alpha2_code
alpha3_code
currencies
capital
calling_codes
alt_spellings
relevance
region
subregion
translation
population
latlng
demonym
area
gini
timezones
borders
native_name
name
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for python-restcountries-0.1b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | db62134cb10fcbc17bcf01ad310ee796bcb4d4c46d596d1e3c1645413359dc75 |
|
MD5 | 1de5224d11662b8e6f7c6245c0798307 |
|
BLAKE2b-256 | bc41adf8fde3b5157ee21548476670dd40caf3747a647d7625b6784111f7c3dc |