Skip to main content

Python API Wrapper for restcountries.eu

Project description

This is a simple python wrapper for the API of http://rest-coutries.eu <http://rest-coutries.eu>. If there are any issues, please use this repository to contact me about it.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-restcountries-0.1a0.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file python-restcountries-0.1a0.tar.gz.

File metadata

File hashes

Hashes for python-restcountries-0.1a0.tar.gz
Algorithm Hash digest
SHA256 a483013afb77e918624c12e71ed04d5e1b6ababb51552eeb34cfb9d7f483209f
MD5 88808a93aa0d02a8f0a44573b093f29d
BLAKE2b-256 375b9cfde9d3c8727825b16339f4e168970e62cee5e3cef826943d6a7f4facf2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page