countrydata


Namecountrydata JSON
Version 1.0.6 PyPI version JSON
download
home_pageNone
SummaryAn improved python package for retrieving data of all the countries in the world. Based on Manoj's
upload_time2024-09-07 15:08:04
maintainerNone
docs_urlNone
authorGabi
requires_pythonNone
licenseMIT
keywords country countrydata countryinfo country information country data country info
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # countrydata: Your Python Passport to Global Insights 🗺️ 

Effortlessly access comprehensive data for every country in the world with `countrydata`. This package provides a simple and intuitive way to retrieve information ranging from basic facts like capitals and currencies to detailed insights about states, cities, and more.

## Why Choose `countrydata`?

* **Simplicity:**  Effortlessly retrieve data using intuitive functions and clear syntax.
* **Comprehensiveness:** Access a wide range of data points, including demographics, geography, culture, and more.
* **Up-to-Date:**  We strive to maintain current information, so you can rely on the accuracy of our data.

## Installation

Use pip to install `countrydata`:

```bash
pip install countrydata
```

## Usage

There are 2 modules -
1. Retrieving data of all countries **(Module Countries)**
2. Retrieving data of a single country **(Module Country)**

### Modules and their functions

##### Module Countries

- [countries()](#countries)
- [phone_code()](#phone_code)
- [currencies()](#currencies) 
- [capitals()](#capitals)  
- [continents()](#continents)   
- [countries_in_continents()](#countries_in_continents)
- [regions()](#regions)
- [countries_in_region()](#countries_in_region) 
- [states()](#states) 

##### Module Country

- [info()](#info) 
- [name()](#name)  
- [states()](#states) 
- [cities()](#cities)  
- [states_and_cities()](#states_and_cities)  
- [iso()](#iso) 
- [alt_spelling()](#alt_spellings) 
- [area()](#area)  
- [borders()](#borders)  
- [capital()](#capital)  
- [calling_codes()](#calling_codes)  
- [independence()](#independence) 
- [currency()](#currency) 
- [capital_latlng()](#capital_latlng) 
- [demonym()](#demonym) 
- [flag()](#flag) 
- [languages()](#languages) 
- [latlang()](#latlng)  
- [native_name()](#native_name) 
- [population()](#population)  
- [timezones()](#timezones) 
- [tld()](#tld) 
- [translations()](#translations) 
- [continents()](#continent) 
- [temperature()](#temperature)  
- [government()](#government) 
- [expectancy()](#expectancy)  
- [dish()](#dish)  
- [symbol()](#symbol) 
- [desnity()](#density)  
- [region()](#region) 
- [religion()](#religion)  
- [total_states()](#total_states)  
- [total_cities()](#total_cities)  
- [wiki()](#wiki)  
- [gei_json()](#geo_json)  
- [all()](#all) 


## Module Countries

> For the sake of simplicity, I will be showing less data in outputs here.

### .countries()
Returns the list of all available countries in the world

``` python
from countrydata import countries

data = countries.all_countries()
data.countries() 

```

``` python
['Afghanistan', 'Aland Islands', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua And Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas The',  'Vietnam', 'Virgin Islands (British)', 'Virgin Islands (US)', 'Wallis And Futuna Islands', 'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe'] 

```

### .phone_code()
Returns phone codes of each country in a dictionary

``` python
from countrydata import countries

country = countries.all_countries()
print(country.phone_code()) 

```

``` python
{'Afghanistan': '93', 'Aland Islands': '+358-18', 'Albania': '355', 'Algeria': '213', 'American Samoa': '+1-684', 'Andorra': '376', 'Angola': '244', 'Anguilla': '+1-264', 'Antarctica': '', 'Antigua And Barbuda': '+1-268', 'Argentina': '54', 'Armenia': '374', 'Aruba': '297', 'Australia': '61', 'Austria': '43', 'Azerbaijan': '994', 'Bahamas The': '+1-242', 'Bahrain': '973', 'Bangladesh': '880', 

```

### .currencies()
Returns currencies of each country in a dictionary

```python
from countrydata import countries

country = countries.all_countries()
print(country.currencies()) 

```

```python
{'Afghanistan': 'AFN', 'Aland Islands': 'EUR', 'Albania': 'ALL', 'Algeria': 'DZD', 'American Samoa': 'USD', 'Andorra': 'EUR', 'Angola': 'AOA', 'Anguilla': 'XCD', 'Antarctica': '', 'Antigua And Barbuda': 'XCD', 'Argentina': 'ARS', 'Belgium': 'EUR', 'Belize': 'BZD', 'Benin': 'XOF', 'Bermuda': 'BMD', 'Bhutan': 'BTN', 'Bolivia': 'BOB', 'Bosnia and Herzegovina': 'BAM', 'Botswana': 'BWP',

```

### .capitals()
Returns captial cities of each country in a dictionary
```python
from countrydata import countries

country = countries.all_countries()
print(country.capitals()) 
```
```python
{'Afghanistan': 'Kabul', 'Aland Islands': 'Mariehamn', 'Albania': 'Tirana', 'Algeria': 'Algiers', 'American Samoa': 'Pago Pago', 'Andorra': 'Andorra la Vella', 'Angola': 'Luanda', 'Anguilla': 'The Valley', 'Antarctica': '', 'Antigua And Barbuda': "St. John's",  'Bahamas The': 'Nassau', 'Bahrain': 'Manama', 'Bangladesh': 'Dhaka', 'Barbados': 'Bridgetown', 'Belarus': 'Minsk', 'Belgium': 'Brussels', 'Belize': 'Belmopan', 
```

### .continents()
Returns continents of each country
```python
from countrydata import countries

country = countries.all_countries()
print(country.continents()) 
```

```
[{'country': 'Afghanistan', 'continent': 'Asia'}, {'country': 'Albania', 'continent': 'Europe'}, {'country': 'Algeria', 'continent': 'Africa'}, {'country': 'American Samoa', 'continent': 'Oceania'}, {'country': 'Andorra', 'continent': 'Europe'}, {'country': 'Angola', 'continent': 'Africa'}, {'country': 'Anguilla', 'continent': 'North America'},{'country': 'Antarctica', 'continent': 'Antarctica'}],

```

### .countries_in_continents()
Returns a list of countries present in a continent
```python
from countrydata import countries

country = countries.all_countries()
print(country.countries_in_continents()) 
```

```python
{'Asia': ['Afghanistan', 'Armenia', 'Azerbaijan', 'Bahrain', 'Bangladesh', 'Bhutan', 'Brunei', 'Cambodia', 'China', 'Cyprus', 'East Timor', 'Georgia', 'Hong Kong', 'India', 'Indonesia', 'Iran', 'Iraq', 'Israel', 'Japan', 'Jordan', 'Kazakhstan', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Lebanon',   'Tajikistan', 'Thailand', 'Turkey', 'Turkmenistan', 'United Arab Emirates', 'Uzbekistan', 'Vietnam', 'Yemen']
```

### .regions()
Returns countries with its region
```python
from countrydata import countries

country = countries.all_countries()
print(country.regions()) 
```

```python
[{'country': 'Afghanistan', 'location': 'Southern and Central Asia'}, {'country': 'Albania', 'location': 'Southern Europe'}, {'country': 'Algeria', 'location': 'Northern Africa'}, {'country': 'American Samoa', 'location': 'Polynesia'}, {'country': 'Andorra', 'location': 'Southern Europe'}, {'country': 'Aruba', 'location': 'Caribbean'}, {'country': 'Australia', 'location': 'Australia and New Zealand'},  
```

### .countries_in_region()
Returns list of countries present in its region
```python
from countrydata import countries

country = countries.all_countries()
print(country.countries_in_region()) 
```

```python
{'Antarctica': ['Antarctica', 'Heard Island and McDonald Islands', 'South Georgia and the South Sandwich Islands'], 'Eastern Europe': ['Belarus', 'Hungary', 'Moldova', 'Poland', 'Romania', 'Ukraine'], 'Southern Europe': ['Albania', 'Andorra',   'Italy', 'North Macedonia', 'Yugoslavia'], 'Western Europe': ['Austria', 'Belgium', 'France', 'Germany', 'Liechtenstein',  'Switzerland'], 'North America': ['Bermuda',  'United States'],
```

### .states()
Returns all the available states in the world with its state code 
```python
from countrydata import countries

country = countries.all_countries()
print(country.states()) 
```
```python
{'id': 1836, 'name': 'Nenets Autonomous Okrug', 'state_code': 'NEN'}, {'id': 1857, 'name': 'Nizhny Novgorod Oblast', 'state_code': 'NIZ'}, {'id': 1834, 'name': 'Novgorod Oblast', 'state_code': 'NGR'}, {'id': 1888, 'name': 'Novosibirsk', 'state_code': 'NVS'}, {'id': 1846, 'name': 'Omsk Oblast', 'state_code': 'OMS'}, {'id': 1886, 'name': 'Orenburg Oblast', 'state_code': 'ORE'}, {'id': 1908, 'name': 'Oryol Oblast', 'state_code': 'ORL'}, {'id': 1909, 'name': 'Penza Oblast', 'state_code': 'PNZ'}, {'id': 1871, 'name': 'Perm Krai', 'state_code': 'PER'}, {'id': 1833, 'name': 'Primorsky Krai', 'state_code': 'PRI'}, {'id': 1863, 'name': 'Pskov Oblast', 'state_code': 'PSK'}, {'id': 1852, 'name': 'Republic of Adygea', 'state_code': 'AD'} 
```



## Module Country

### .info()

```python
from countrydata import country

country = country.country_details('Spain')  #you can give your desired country
print(country.info()) 
```
```
# Returns the data present below in a dict
```

### .name()
Returns the name of the country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.name()) 

```

```
India
```


### .states()
Returns all available in a  states list
```python
from countrydata import country

country = country.country_details('Spain')
print(country.states()) 

```
```python
['Andaman and Nicobar Islands', 'Andhra Pradesh', 'Arunachal Pradesh', 'Assam', 'Bihar', 'Chandigarh', 'Chhattisgarh', 'Dadra and Nagar Haveli', 'Daman and Diu', 'Delhi', 'Goa', 'Gujarat', 'Haryana', 'Himachal Pradesh', 'Jammu and Kashmir', 'Jharkhand', 'Karnataka', 'Kerala', 'Ladakh', 'Lakshadweep', 'Madhya Pradesh', 'Maharashtra', 'Manipur', 'Meghalaya', 'Mizoram', 'Nagaland', 'Odisha', 'Puducherry', 'Punjab', 'Rajasthan', 'Sikkim', 'Tamil Nadu', 'Telangana', 'Tripura', 
'Uttar Pradesh', 'Uttarakhand', 'West Bengal']
```


### .cities()
Returns all available cities in a list
```python
from countrydata import country

country = country.country_details('Spain')
print(country.cities()) 

```

```python
# I am just displaying just a part of information here due to huge huge data
['Bamboo Flat', 'Nicobar', 'Port Blair', 'South Andaman', 'Addanki', 'Ādoni', 'Akasahebpet', 'Akivīdu', 'Akkarampalle', 'Amalāpuram', 'Amudālavalasa', 'Anakāpalle', 'Anantapur', 'Atmakūr', 'Attili', 'Avanigadda', 'Badvel', 'Banganapalle', 'Bāpatla', 'Betamcherla', 'Bhattiprolu', 'Bhīmavaram', 'Bhīmunipatnam', 'Bobbili', 'Challapalle', 'Chemmumiahpet', 'Chilakalūrupet', 'Chinnachowk', 'Chīpurupalle', 'Chīrāla', 'Chittoor',  'Diguvametta', 'East Godāvari', 'Elamanchili', 'Puttaparthi', 'Puttūr', 'Rājahmundry',  'Takdah', 'Taki', 'Tamluk', 'Tarakeswar', 'Titagarh', 'Tufanganj', 'Tulin', 'Uchalan', 'Ula', 'Uluberia', 'Uttar Dinajpur district', 'Uttarpara Kotrung']
```

### .states_and_cities()
Returns states and cities in a dict
```python
from countrydata import country

country = country.country_details('Spain')
print(country.states_and_cities()) 
```

```python
# I am just displaying just a part of information here due to huge huge data
[{'id': 142095, 'name': 'South 24 Parganas district', 'latitude': '22.16197000', 'longitude': '88.43170000'}, {'id': 142096, 'name': 'Srikhanda', 'latitude': '23.60000000', 'longitude': '88.08330000'}, {'id': 142097, 'name': 'Srirampur', 'latitude': '23.35000000', 'longitude': '88.12000000'}, {'id': 142098, 'name': 'Suri', 'latitude': '23.91666667', 'longitude': '87.53333333'}, {'id': 142099, 'name': 'Swarupnagar community development block', 'latitude': '22.83330000', 'longitude': '88.86670000'}, {'id': 142100, 'name': 'Takdah', 'latitude': '27.03330000', 'longitude': '88.36670000'}, ]}]
```


### .iso()
Returns ISO codes for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.iso()) 

```

```
{'alpha2': 'IN', 'alpha3': 'IND'}
```
### .alt_spellings()
```python
Returns alternate spellings for the name of a specified country
from countrydata import country

country = country.country_details('Spain')
print(country.alt_spellings()) 

```

```
['IN', 'Bhārat', 'Republic of India', 'Bharat Ganrajya']
```
### .area()
Returns area (km²) for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.area()) 

```

```
3287590
```
### .borders()
Returns bordering countries (ISO3) for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.borders()) 

```

```
['AFG', 'BGD', 'BTN', 'MMR', 'CHN', 'NPL', 'PAK', 'LKA']
```
### .capital()
Returns capital city for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.capital()) 

```

```
New Delhi
```

### .calling_codes()
```python
from countrydata import country

country = country.country_details('Spain')
print(country.calling_codes()) 

```

```
 ["91"]
```
### .independence()
Returns independence year for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.independence()) 

```

```
1947
```
### .currency()
Returns official currency for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.currency()) 

```

```
['INR']
```
### .capital_latlng()
Returns capital city latitude and longitude for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.capital_latlng()) 

```

```
[28.614179, 77.202266]
```
### .demonym()
Returns the demonyms for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.demonym()) 

```

```
Indian
```
### .flag()
Returns SVG link of the official flag for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.flag()) 

```

```
Sorry there is no link for indain flag :(
```

### .languages()
Returns all spoken languages for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.languages()) 

```

```
['Asami', 'Bengali', 'Gujarati', 'Hindi', 'Kannada', 'Malayalam', 'Marathi', 'Odia', 'Punjabi', 'Tamil', 'Telugu', 'Urdu', 'Sanskrit', 'English', 'Konkani', 'Nepali', 'Bodo', 'Kashmiri', 'Maithili', 'Santali', 'Sindhi']
```
### .latlng()
Returns approx latitude and longitude for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.latlng()) 

```

```
 [20, 77]
```
### .native_name()
Returns the name of the country in its native tongue
```python
from countrydata import country

country = country.country_details('Spain')
print(country.native_name()) 

```

```
भारत
```
### .population()
Returns the population of the specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.population()) 

```

```
1263930000
```
### .timezones()
Returns the timezones of a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.timezones()) 

```

```
['UTC+05:30']
```
### .tld()
Returns the domain extension of a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.tld()) 

```

```
['.in']
```
### .translations()
Returns translations of a given country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.translations()) 

```

```
{'de': 'Indien', 'es': 'India', 'fr': 'Inde', 'ja': 'インド', 'it': 'India'}
```
### .continent()
Returns the continent of a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.continent()) 

```

```
Asia
```
### .temperature()
Returns the average temperature for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.temperature()) 

```

```
23.65
```
### .government()
Returns the type of government for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.government()) 

```

```
Federal Republic
```
### .expectancy()
Returns the life expectancy of a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.expectancy()) 

```

```
62.5
```
### .dish()
Returns the national dish of a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.dish()) 

```

```
No officially announced national dish
```
### .symbol()
Returns the national symbol of a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.symbol()) 

```

```
animal
```
### .density()
Returns the density of a specified country in sq km
```python
from countrydata import country

country = country.country_details('Spain')
print(country.density()) 

```

```
454.9380726
```
### .region()
Returns the region of a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.region()) 

```

```
Southern and Central Asia
```
### .religion()
Returns the religion of the specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.religion()) 

```

```
Hinduism
```
### .total_states()
Returns the total number of states for the specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.total_states()) 

```

```
37 #including union territories
```
### .total_cities()
Return total numnber of cities for the specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.total_cities()) 

```

```
3865
```
### .wiki()
Returns the Wikipedia page link for the specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.wiki()) 

```

```
http://en.wikipedia.org/wiki/india
```
### .all()
Returns the every available data of all the countries in the world
```python
from countrydata import country

country = country.country_details()
print(country.all()) 

```

```python
# I am not displaying the output here as the data is enormous. You can try it yourself :)
```

### .geo_json()
Returns geoJSON for a specified country
```python
from countrydata import country

country = country.country_details('Spain')
print(country.geo_json()) 

```

```
{
        "type": "FeatureCollection",
        "features": [
            {
                "type": "Feature",
                "id": "IND",
                "properties": {
                    "name": "India"
                },
                "geometry": {
                    "type": "Polygon",
                    "coordinates": [
                        [
                            [
                                77.837451,
                                35.49401
                            ],
                            [
                                78.912269,
                                34.321936
                            ],
                            [
                                78.811086,
                                33.506198
                            ],
                            [
                                77.837451,
                                35.49401
                            ]
                        ]
                    ]
                }
            }
        ]
    },
```

## License

This project is licensed under the [MIT License](LICENSE). 

## Maintained By Me

### Update sponsored by [PornoReino](https://www.pornoreino.com)

### Originally created by [Manumanoj]()



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "countrydata",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "country, countrydata, countryinfo, country information, country data, country info",
    "author": "Gabi",
    "author_email": "gfxsetup@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/92/55/553937f239d33cdbc4e16767cf652036e08aa3cd37ce6a2d4390dd9a609d/countrydata-1.0.6.tar.gz",
    "platform": null,
    "description": "# countrydata: Your Python Passport to Global Insights \ud83d\uddfa\ufe0f \r\n\r\nEffortlessly access comprehensive data for every country in the world with `countrydata`. This package provides a simple and intuitive way to retrieve information ranging from basic facts like capitals and currencies to detailed insights about states, cities, and more.\r\n\r\n## Why Choose `countrydata`?\r\n\r\n* **Simplicity:**  Effortlessly retrieve data using intuitive functions and clear syntax.\r\n* **Comprehensiveness:** Access a wide range of data points, including demographics, geography, culture, and more.\r\n* **Up-to-Date:**  We strive to maintain current information, so you can rely on the accuracy of our data.\r\n\r\n## Installation\r\n\r\nUse pip to install `countrydata`:\r\n\r\n```bash\r\npip install countrydata\r\n```\r\n\r\n## Usage\r\n\r\nThere are 2 modules -\r\n1. Retrieving data of all countries **(Module Countries)**\r\n2. Retrieving data of a single country **(Module Country)**\r\n\r\n### Modules and their functions\r\n\r\n##### Module Countries\r\n\r\n- [countries()](#countries)\r\n- [phone_code()](#phone_code)\r\n- [currencies()](#currencies) \r\n- [capitals()](#capitals)  \r\n- [continents()](#continents)   \r\n- [countries_in_continents()](#countries_in_continents)\r\n- [regions()](#regions)\r\n- [countries_in_region()](#countries_in_region) \r\n- [states()](#states) \r\n\r\n##### Module Country\r\n\r\n- [info()](#info) \r\n- [name()](#name)  \r\n- [states()](#states) \r\n- [cities()](#cities)  \r\n- [states_and_cities()](#states_and_cities)  \r\n- [iso()](#iso) \r\n- [alt_spelling()](#alt_spellings) \r\n- [area()](#area)  \r\n- [borders()](#borders)  \r\n- [capital()](#capital)  \r\n- [calling_codes()](#calling_codes)  \r\n- [independence()](#independence) \r\n- [currency()](#currency) \r\n- [capital_latlng()](#capital_latlng) \r\n- [demonym()](#demonym) \r\n- [flag()](#flag) \r\n- [languages()](#languages) \r\n- [latlang()](#latlng)  \r\n- [native_name()](#native_name) \r\n- [population()](#population)  \r\n- [timezones()](#timezones) \r\n- [tld()](#tld) \r\n- [translations()](#translations) \r\n- [continents()](#continent) \r\n- [temperature()](#temperature)  \r\n- [government()](#government) \r\n- [expectancy()](#expectancy)  \r\n- [dish()](#dish)  \r\n- [symbol()](#symbol) \r\n- [desnity()](#density)  \r\n- [region()](#region) \r\n- [religion()](#religion)  \r\n- [total_states()](#total_states)  \r\n- [total_cities()](#total_cities)  \r\n- [wiki()](#wiki)  \r\n- [gei_json()](#geo_json)  \r\n- [all()](#all) \r\n\r\n\r\n## Module Countries\r\n\r\n> For the sake of simplicity, I will be showing less data in outputs here.\r\n\r\n### .countries()\r\nReturns the list of all available countries in the world\r\n\r\n``` python\r\nfrom countrydata import countries\r\n\r\ndata = countries.all_countries()\r\ndata.countries() \r\n\r\n```\r\n\r\n``` python\r\n['Afghanistan', 'Aland Islands', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua And Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas The',  'Vietnam', 'Virgin Islands (British)', 'Virgin Islands (US)', 'Wallis And Futuna Islands', 'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe'] \r\n\r\n```\r\n\r\n### .phone_code()\r\nReturns phone codes of each country in a dictionary\r\n\r\n``` python\r\nfrom countrydata import countries\r\n\r\ncountry = countries.all_countries()\r\nprint(country.phone_code()) \r\n\r\n```\r\n\r\n``` python\r\n{'Afghanistan': '93', 'Aland Islands': '+358-18', 'Albania': '355', 'Algeria': '213', 'American Samoa': '+1-684', 'Andorra': '376', 'Angola': '244', 'Anguilla': '+1-264', 'Antarctica': '', 'Antigua And Barbuda': '+1-268', 'Argentina': '54', 'Armenia': '374', 'Aruba': '297', 'Australia': '61', 'Austria': '43', 'Azerbaijan': '994', 'Bahamas The': '+1-242', 'Bahrain': '973', 'Bangladesh': '880', \r\n\r\n```\r\n\r\n### .currencies()\r\nReturns currencies of each country in a dictionary\r\n\r\n```python\r\nfrom countrydata import countries\r\n\r\ncountry = countries.all_countries()\r\nprint(country.currencies()) \r\n\r\n```\r\n\r\n```python\r\n{'Afghanistan': 'AFN', 'Aland Islands': 'EUR', 'Albania': 'ALL', 'Algeria': 'DZD', 'American Samoa': 'USD', 'Andorra': 'EUR', 'Angola': 'AOA', 'Anguilla': 'XCD', 'Antarctica': '', 'Antigua And Barbuda': 'XCD', 'Argentina': 'ARS', 'Belgium': 'EUR', 'Belize': 'BZD', 'Benin': 'XOF', 'Bermuda': 'BMD', 'Bhutan': 'BTN', 'Bolivia': 'BOB', 'Bosnia and Herzegovina': 'BAM', 'Botswana': 'BWP',\r\n\r\n```\r\n\r\n### .capitals()\r\nReturns captial cities of each country in a dictionary\r\n```python\r\nfrom countrydata import countries\r\n\r\ncountry = countries.all_countries()\r\nprint(country.capitals()) \r\n```\r\n```python\r\n{'Afghanistan': 'Kabul', 'Aland Islands': 'Mariehamn', 'Albania': 'Tirana', 'Algeria': 'Algiers', 'American Samoa': 'Pago Pago', 'Andorra': 'Andorra la Vella', 'Angola': 'Luanda', 'Anguilla': 'The Valley', 'Antarctica': '', 'Antigua And Barbuda': \"St. John's\",  'Bahamas The': 'Nassau', 'Bahrain': 'Manama', 'Bangladesh': 'Dhaka', 'Barbados': 'Bridgetown', 'Belarus': 'Minsk', 'Belgium': 'Brussels', 'Belize': 'Belmopan', \r\n```\r\n\r\n### .continents()\r\nReturns continents of each country\r\n```python\r\nfrom countrydata import countries\r\n\r\ncountry = countries.all_countries()\r\nprint(country.continents()) \r\n```\r\n\r\n```\r\n[{'country': 'Afghanistan', 'continent': 'Asia'}, {'country': 'Albania', 'continent': 'Europe'}, {'country': 'Algeria', 'continent': 'Africa'}, {'country': 'American Samoa', 'continent': 'Oceania'}, {'country': 'Andorra', 'continent': 'Europe'}, {'country': 'Angola', 'continent': 'Africa'}, {'country': 'Anguilla', 'continent': 'North America'},{'country': 'Antarctica', 'continent': 'Antarctica'}],\r\n\r\n```\r\n\r\n### .countries_in_continents()\r\nReturns a list of countries present in a continent\r\n```python\r\nfrom countrydata import countries\r\n\r\ncountry = countries.all_countries()\r\nprint(country.countries_in_continents()) \r\n```\r\n\r\n```python\r\n{'Asia': ['Afghanistan', 'Armenia', 'Azerbaijan', 'Bahrain', 'Bangladesh', 'Bhutan', 'Brunei', 'Cambodia', 'China', 'Cyprus', 'East Timor', 'Georgia', 'Hong Kong', 'India', 'Indonesia', 'Iran', 'Iraq', 'Israel', 'Japan', 'Jordan', 'Kazakhstan', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Lebanon',   'Tajikistan', 'Thailand', 'Turkey', 'Turkmenistan', 'United Arab Emirates', 'Uzbekistan', 'Vietnam', 'Yemen']\r\n```\r\n\r\n### .regions()\r\nReturns countries with its region\r\n```python\r\nfrom countrydata import countries\r\n\r\ncountry = countries.all_countries()\r\nprint(country.regions()) \r\n```\r\n\r\n```python\r\n[{'country': 'Afghanistan', 'location': 'Southern and Central Asia'}, {'country': 'Albania', 'location': 'Southern Europe'}, {'country': 'Algeria', 'location': 'Northern Africa'}, {'country': 'American Samoa', 'location': 'Polynesia'}, {'country': 'Andorra', 'location': 'Southern Europe'}, {'country': 'Aruba', 'location': 'Caribbean'}, {'country': 'Australia', 'location': 'Australia and New Zealand'},  \r\n```\r\n\r\n### .countries_in_region()\r\nReturns list of countries present in its region\r\n```python\r\nfrom countrydata import countries\r\n\r\ncountry = countries.all_countries()\r\nprint(country.countries_in_region()) \r\n```\r\n\r\n```python\r\n{'Antarctica': ['Antarctica', 'Heard Island and McDonald Islands', 'South Georgia and the South Sandwich Islands'], 'Eastern Europe': ['Belarus', 'Hungary', 'Moldova', 'Poland', 'Romania', 'Ukraine'], 'Southern Europe': ['Albania', 'Andorra',   'Italy', 'North Macedonia', 'Yugoslavia'], 'Western Europe': ['Austria', 'Belgium', 'France', 'Germany', 'Liechtenstein',  'Switzerland'], 'North America': ['Bermuda',  'United States'],\r\n```\r\n\r\n### .states()\r\nReturns all the available states in the world with its state code \r\n```python\r\nfrom countrydata import countries\r\n\r\ncountry = countries.all_countries()\r\nprint(country.states()) \r\n```\r\n```python\r\n{'id': 1836, 'name': 'Nenets Autonomous Okrug', 'state_code': 'NEN'}, {'id': 1857, 'name': 'Nizhny Novgorod Oblast', 'state_code': 'NIZ'}, {'id': 1834, 'name': 'Novgorod Oblast', 'state_code': 'NGR'}, {'id': 1888, 'name': 'Novosibirsk', 'state_code': 'NVS'}, {'id': 1846, 'name': 'Omsk Oblast', 'state_code': 'OMS'}, {'id': 1886, 'name': 'Orenburg Oblast', 'state_code': 'ORE'}, {'id': 1908, 'name': 'Oryol Oblast', 'state_code': 'ORL'}, {'id': 1909, 'name': 'Penza Oblast', 'state_code': 'PNZ'}, {'id': 1871, 'name': 'Perm Krai', 'state_code': 'PER'}, {'id': 1833, 'name': 'Primorsky Krai', 'state_code': 'PRI'}, {'id': 1863, 'name': 'Pskov Oblast', 'state_code': 'PSK'}, {'id': 1852, 'name': 'Republic of Adygea', 'state_code': 'AD'} \r\n```\r\n\r\n\r\n\r\n## Module Country\r\n\r\n### .info()\r\n\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')  #you can give your desired country\r\nprint(country.info()) \r\n```\r\n```\r\n# Returns the data present below in a dict\r\n```\r\n\r\n### .name()\r\nReturns the name of the country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.name()) \r\n\r\n```\r\n\r\n```\r\nIndia\r\n```\r\n\r\n\r\n### .states()\r\nReturns all available in a  states list\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.states()) \r\n\r\n```\r\n```python\r\n['Andaman and Nicobar Islands', 'Andhra Pradesh', 'Arunachal Pradesh', 'Assam', 'Bihar', 'Chandigarh', 'Chhattisgarh', 'Dadra and Nagar Haveli', 'Daman and Diu', 'Delhi', 'Goa', 'Gujarat', 'Haryana', 'Himachal Pradesh', 'Jammu and Kashmir', 'Jharkhand', 'Karnataka', 'Kerala', 'Ladakh', 'Lakshadweep', 'Madhya Pradesh', 'Maharashtra', 'Manipur', 'Meghalaya', 'Mizoram', 'Nagaland', 'Odisha', 'Puducherry', 'Punjab', 'Rajasthan', 'Sikkim', 'Tamil Nadu', 'Telangana', 'Tripura', \r\n'Uttar Pradesh', 'Uttarakhand', 'West Bengal']\r\n```\r\n\r\n\r\n### .cities()\r\nReturns all available cities in a list\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.cities()) \r\n\r\n```\r\n\r\n```python\r\n# I am just displaying just a part of information here due to huge huge data\r\n['Bamboo Flat', 'Nicobar', 'Port Blair', 'South Andaman', 'Addanki', '\u0100doni', 'Akasahebpet', 'Akiv\u012bdu', 'Akkarampalle', 'Amal\u0101puram', 'Amud\u0101lavalasa', 'Anak\u0101palle', 'Anantapur', 'Atmak\u016br', 'Attili', 'Avanigadda', 'Badvel', 'Banganapalle', 'B\u0101patla', 'Betamcherla', 'Bhattiprolu', 'Bh\u012bmavaram', 'Bh\u012bmunipatnam', 'Bobbili', 'Challapalle', 'Chemmumiahpet', 'Chilakal\u016brupet', 'Chinnachowk', 'Ch\u012bpurupalle', 'Ch\u012br\u0101la', 'Chittoor',  'Diguvametta', 'East God\u0101vari', 'Elamanchili', 'Puttaparthi', 'Putt\u016br', 'R\u0101jahmundry',  'Takdah', 'Taki', 'Tamluk', 'Tarakeswar', 'Titagarh', 'Tufanganj', 'Tulin', 'Uchalan', 'Ula', 'Uluberia', 'Uttar Dinajpur district', 'Uttarpara Kotrung']\r\n```\r\n\r\n### .states_and_cities()\r\nReturns states and cities in a dict\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.states_and_cities()) \r\n```\r\n\r\n```python\r\n# I am just displaying just a part of information here due to huge huge data\r\n[{'id': 142095, 'name': 'South 24 Parganas district', 'latitude': '22.16197000', 'longitude': '88.43170000'}, {'id': 142096, 'name': 'Srikhanda', 'latitude': '23.60000000', 'longitude': '88.08330000'}, {'id': 142097, 'name': 'Srirampur', 'latitude': '23.35000000', 'longitude': '88.12000000'}, {'id': 142098, 'name': 'Suri', 'latitude': '23.91666667', 'longitude': '87.53333333'}, {'id': 142099, 'name': 'Swarupnagar community development block', 'latitude': '22.83330000', 'longitude': '88.86670000'}, {'id': 142100, 'name': 'Takdah', 'latitude': '27.03330000', 'longitude': '88.36670000'}, ]}]\r\n```\r\n\r\n\r\n### .iso()\r\nReturns ISO codes for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.iso()) \r\n\r\n```\r\n\r\n```\r\n{'alpha2': 'IN', 'alpha3': 'IND'}\r\n```\r\n### .alt_spellings()\r\n```python\r\nReturns alternate spellings for the name of a specified country\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.alt_spellings()) \r\n\r\n```\r\n\r\n```\r\n['IN', 'Bh\u0101rat', 'Republic of India', 'Bharat Ganrajya']\r\n```\r\n### .area()\r\nReturns area (km\u00b2) for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.area()) \r\n\r\n```\r\n\r\n```\r\n3287590\r\n```\r\n### .borders()\r\nReturns bordering countries (ISO3) for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.borders()) \r\n\r\n```\r\n\r\n```\r\n['AFG', 'BGD', 'BTN', 'MMR', 'CHN', 'NPL', 'PAK', 'LKA']\r\n```\r\n### .capital()\r\nReturns capital city for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.capital()) \r\n\r\n```\r\n\r\n```\r\nNew Delhi\r\n```\r\n\r\n### .calling_codes()\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.calling_codes()) \r\n\r\n```\r\n\r\n```\r\n [\"91\"]\r\n```\r\n### .independence()\r\nReturns independence year for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.independence()) \r\n\r\n```\r\n\r\n```\r\n1947\r\n```\r\n### .currency()\r\nReturns official currency for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.currency()) \r\n\r\n```\r\n\r\n```\r\n['INR']\r\n```\r\n### .capital_latlng()\r\nReturns capital city latitude and longitude for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.capital_latlng()) \r\n\r\n```\r\n\r\n```\r\n[28.614179, 77.202266]\r\n```\r\n### .demonym()\r\nReturns the demonyms for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.demonym()) \r\n\r\n```\r\n\r\n```\r\nIndian\r\n```\r\n### .flag()\r\nReturns SVG link of the official flag for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.flag()) \r\n\r\n```\r\n\r\n```\r\nSorry there is no link for indain flag :(\r\n```\r\n\r\n### .languages()\r\nReturns all spoken languages for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.languages()) \r\n\r\n```\r\n\r\n```\r\n['Asami', 'Bengali', 'Gujarati', 'Hindi', 'Kannada', 'Malayalam', 'Marathi', 'Odia', 'Punjabi', 'Tamil', 'Telugu', 'Urdu', 'Sanskrit', 'English', 'Konkani', 'Nepali', 'Bodo', 'Kashmiri', 'Maithili', 'Santali', 'Sindhi']\r\n```\r\n### .latlng()\r\nReturns approx latitude and longitude for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.latlng()) \r\n\r\n```\r\n\r\n```\r\n [20, 77]\r\n```\r\n### .native_name()\r\nReturns the name of the country in its native tongue\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.native_name()) \r\n\r\n```\r\n\r\n```\r\n\u092d\u093e\u0930\u0924\r\n```\r\n### .population()\r\nReturns the population of the specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.population()) \r\n\r\n```\r\n\r\n```\r\n1263930000\r\n```\r\n### .timezones()\r\nReturns the timezones of a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.timezones()) \r\n\r\n```\r\n\r\n```\r\n['UTC+05:30']\r\n```\r\n### .tld()\r\nReturns the domain extension of a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.tld()) \r\n\r\n```\r\n\r\n```\r\n['.in']\r\n```\r\n### .translations()\r\nReturns translations of a given country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.translations()) \r\n\r\n```\r\n\r\n```\r\n{'de': 'Indien', 'es': 'India', 'fr': 'Inde', 'ja': '\u30a4\u30f3\u30c9', 'it': 'India'}\r\n```\r\n### .continent()\r\nReturns the continent of a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.continent()) \r\n\r\n```\r\n\r\n```\r\nAsia\r\n```\r\n### .temperature()\r\nReturns the average temperature for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.temperature()) \r\n\r\n```\r\n\r\n```\r\n23.65\r\n```\r\n### .government()\r\nReturns the type of government for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.government()) \r\n\r\n```\r\n\r\n```\r\nFederal Republic\r\n```\r\n### .expectancy()\r\nReturns the life expectancy of a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.expectancy()) \r\n\r\n```\r\n\r\n```\r\n62.5\r\n```\r\n### .dish()\r\nReturns the national dish of a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.dish()) \r\n\r\n```\r\n\r\n```\r\nNo officially announced national dish\r\n```\r\n### .symbol()\r\nReturns the national symbol of a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.symbol()) \r\n\r\n```\r\n\r\n```\r\nanimal\r\n```\r\n### .density()\r\nReturns the density of a specified country in sq km\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.density()) \r\n\r\n```\r\n\r\n```\r\n454.9380726\r\n```\r\n### .region()\r\nReturns the region of a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.region()) \r\n\r\n```\r\n\r\n```\r\nSouthern and Central Asia\r\n```\r\n### .religion()\r\nReturns the religion of the specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.religion()) \r\n\r\n```\r\n\r\n```\r\nHinduism\r\n```\r\n### .total_states()\r\nReturns the total number of states for the specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.total_states()) \r\n\r\n```\r\n\r\n```\r\n37 #including union territories\r\n```\r\n### .total_cities()\r\nReturn total numnber of cities for the specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.total_cities()) \r\n\r\n```\r\n\r\n```\r\n3865\r\n```\r\n### .wiki()\r\nReturns the Wikipedia page link for the specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.wiki()) \r\n\r\n```\r\n\r\n```\r\nhttp://en.wikipedia.org/wiki/india\r\n```\r\n### .all()\r\nReturns the every available data of all the countries in the world\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details()\r\nprint(country.all()) \r\n\r\n```\r\n\r\n```python\r\n# I am not displaying the output here as the data is enormous. You can try it yourself :)\r\n```\r\n\r\n### .geo_json()\r\nReturns geoJSON for a specified country\r\n```python\r\nfrom countrydata import country\r\n\r\ncountry = country.country_details('Spain')\r\nprint(country.geo_json()) \r\n\r\n```\r\n\r\n```\r\n{\r\n        \"type\": \"FeatureCollection\",\r\n        \"features\": [\r\n            {\r\n                \"type\": \"Feature\",\r\n                \"id\": \"IND\",\r\n                \"properties\": {\r\n                    \"name\": \"India\"\r\n                },\r\n                \"geometry\": {\r\n                    \"type\": \"Polygon\",\r\n                    \"coordinates\": [\r\n                        [\r\n                            [\r\n                                77.837451,\r\n                                35.49401\r\n                            ],\r\n                            [\r\n                                78.912269,\r\n                                34.321936\r\n                            ],\r\n                            [\r\n                                78.811086,\r\n                                33.506198\r\n                            ],\r\n                            [\r\n                                77.837451,\r\n                                35.49401\r\n                            ]\r\n                        ]\r\n                    ]\r\n                }\r\n            }\r\n        ]\r\n    },\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the [MIT License](LICENSE). \r\n\r\n## Maintained By Me\r\n\r\n### Update sponsored by [PornoReino](https://www.pornoreino.com)\r\n\r\n### Originally created by [Manumanoj]()\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An improved python package for retrieving data of all the countries in the world. Based on Manoj's",
    "version": "1.0.6",
    "project_urls": null,
    "split_keywords": [
        "country",
        " countrydata",
        " countryinfo",
        " country information",
        " country data",
        " country info"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c545957b1ded60c893cb47211a8039cb8ce4296e452ca3ec0bafffed8d9e97b6",
                "md5": "c1288dd8541cd45c85995a2207ec20d8",
                "sha256": "4b254d9f32fd112713d300df28d2f21f616d901452f996f7ec81b48265a39b72"
            },
            "downloads": -1,
            "filename": "countrydata-1.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c1288dd8541cd45c85995a2207ec20d8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7065925,
            "upload_time": "2024-09-07T15:08:03",
            "upload_time_iso_8601": "2024-09-07T15:08:03.100994Z",
            "url": "https://files.pythonhosted.org/packages/c5/45/957b1ded60c893cb47211a8039cb8ce4296e452ca3ec0bafffed8d9e97b6/countrydata-1.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9255553937f239d33cdbc4e16767cf652036e08aa3cd37ce6a2d4390dd9a609d",
                "md5": "3a0e535d028487a4ad06aa8ba11e33ab",
                "sha256": "b74ffce3371c9d2214b901e95d6fdb1a01ca2206551274f96d8011a2b20f4ba1"
            },
            "downloads": -1,
            "filename": "countrydata-1.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "3a0e535d028487a4ad06aa8ba11e33ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3334162,
            "upload_time": "2024-09-07T15:08:04",
            "upload_time_iso_8601": "2024-09-07T15:08:04.764287Z",
            "url": "https://files.pythonhosted.org/packages/92/55/553937f239d33cdbc4e16767cf652036e08aa3cd37ce6a2d4390dd9a609d/countrydata-1.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 15:08:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "countrydata"
}
        
Elapsed time: 0.33386s