Skip to main content

Comprehensive and Lightweight Country Data Package

Project description

pyworldatlas

pyworldatlas is a lightweight and comprehensive Python package that compiles detailed data about every country in the world. Whether you're building applications that require accurate global data or simply need quick access to country profiles, pyworldatlas provides an efficient and easy-to-use interface.

Key Features

  • Extensive country data including official names, population, geography, government, GDP, and more.
  • Lightweight and efficient, ensuring fast access to country information.
  • No external dependencies, making it easy to install and integrate into any Python project.
  • Provides detailed country profiles in a simple dictionary format.

Installation

You can install pyworldatlas from PyPI using pip:

pip install pyworldatlas

Basic Usage

Once installed, using pyworldatlas is straightforward. Here's a quick example of how to fetch a country's profile:

import pyworldatlas as pwa

atlas = pwa.Atlas()

# Fetch the profile of a country by name
profile = atlas.get_country_profile("Albania")

# Display the profile information
print(profile)

Example output:

{
    "capital": {
        "name": "Tirana",
        "coordinates_degree_east": 19.49,
        "coordinates_degree_north": 41.19,
        "is_largest_city": True
    },
    "area": {
        "total_km2_including_disputed_territories": None,
        "total_km2_internationally_recognized": 28748.0,
        "water_percentage": 4.7
    },
    "driving_side": "Right",
    "calling_code": "355",
    "iso_3166_code": "AL",
    "internet_tld": ".al",
    "population": {
        "total": 2994667,
        "density_km2": 111.1,
        "date_year": 2011
    },
    "gini_index": {
        "value": 26.7,
        "year": 2005
    },
    "gdp": {
        "ppp_trillions": 0.025035,
        "ppp_per_capita": 7780.0,
        "nominal_total_trillions": 0.013292,
        "nominal_per_capita": 4131.0,
        "ppp_gdp_year": 2011,
        "nominal_gdp_year": 2011
    },
    "government": {
        "president": "Bajram Begaj",
        "prime_minister": "Edi Rama",
        "declaration_of_state_sovereignty": "1912-11-28",
        "other_leader_title": None,
        "other_leader": None,
        "government_type": "Parliamentary republic",
        "president_assumed_office": "2022-07-24",
        "prime_minister_assumed_office": "2013-09-15",
        "other_leader_assumed_office": None
    },
    "official_names": {
        "Albanian": "Republika e Shqipërisë",
        "English": "Republic of Albania"
    },
    "anthem": {
        "Albanian": "Himni i Flamurit",
        "English": "Hymn to the Flag"
    },
    "motto": {
        "Albanian": "Ti, Shqipëri, më jep nder, më jep emrin Shqiptar",
        "English": "You, Albania, give me honor, give me the name Albanian"
    },
    "religion": {
        "Islam": 50.67,
        "Christianity": 16.02,
        "Non-denominational": 13.83,
        "Atheism": 3.55,
        "Others": 0.15,
        "Undeclared": 15.77
    },
    "ethnic_groups": {
        "Albanians": 98.2,
        "Others": 1.8
    },
    "languages": {
        "official_languages": ["Albanian"],
        "recognized_languages": []
    },
    "currency": {
        "name": "Lek",
        "symbol": "L",
        "iso_code": "ALL"
    },
    "continent": "Europe",
    "timezones": {
        "UTC+1": {"DST": 1},
        "UTC+2": {"DST": 1}
    }
}

Documentation

Comprehensive documentation is available, including examples, API references, and more. Visit the pyworldatlas Documentation to get started.

Contributing

If you'd like to contribute, please check out the Contributing Page for details.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Links

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

pyworldatlas-0.0.12.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

pyworldatlas-0.0.12-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file pyworldatlas-0.0.12.tar.gz.

File metadata

  • Download URL: pyworldatlas-0.0.12.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pyworldatlas-0.0.12.tar.gz
Algorithm Hash digest
SHA256 5f362b72480d5b08d7f5f33da8aca8823813b6e38891ac80aa163118b6e954e5
MD5 f8fa61368ed14c3cfdaa7fa991d5bb1f
BLAKE2b-256 4b09373055d6e005f232b6f896607c12a3b06331c2cb263622572882facf01c5

See more details on using hashes here.

File details

Details for the file pyworldatlas-0.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for pyworldatlas-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 86ea7126c26a45316187b5686c6ae7cc94e96b233ef13a1635502cb26bb472c5
MD5 5089044269451bf04f460eaaa7f1f5bf
BLAKE2b-256 38579997fc8a11804711bc7fc49bac60df29bb3007c211ba96292c67a7c52997

See more details on using hashes here.

Supported by

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