A comprehensive Python library for accessing detailed country information
Project description
Countries Info
A comprehensive Python library for accessing detailed country information including names, codes, capitals, continents, population, and area.
Installation
pip install countries-info-mg
Usage
from countries_info import get_all_countries, get_country_by_name, get_country_by_code
# Get all countries
countries = get_all_countries()
# Get country by name
france = get_country_by_name("France")
# Get country by code
usa = get_country_by_code("US")
Features
- Get detailed information about countries
- Search countries by name or code
- Access data about:
- Official names
- Country codes
- Capitals
- Continents
- Population
- Area
- And more!
Data Structure
Each country object contains:
{
"name": str, # Country name
"code": str, # ISO 2-letter code
"capital": str, # Capital city
"continent": str, # Continent
"population": int, # Population
"area": float, # Area in square kilometers
}
License
MIT License
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
countries_info_mg-1.0.0.tar.gz
(21.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file countries_info_mg-1.0.0.tar.gz.
File metadata
- Download URL: countries_info_mg-1.0.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f941e974e34b6419fca450b92f15e4f980eb3457b838ae1e2438dfb9093d3e7
|
|
| MD5 |
f4bca2a3fa19702b15c4327d6fde9d6c
|
|
| BLAKE2b-256 |
f362a26a65500627a7f36054a2e152968bd511833c69af4e292b8a39060df0a1
|
File details
Details for the file countries_info_mg-1.0.0-py3-none-any.whl.
File metadata
- Download URL: countries_info_mg-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b40ef67e408c3b8b27e763cc59a79726f435b90be5dd373585e1c048cf10b29
|
|
| MD5 |
518f8ac2af44def8efcd9ada3919b863
|
|
| BLAKE2b-256 |
5b91f37c39f3e8df5686e06c84452ed0c8f0d0979ab63917255adabf6c92fead
|