Skip to main content

A Python package to get countries, states and cities information

Project description

API 🚀

🎉 Introducing API for Countries States Cities Database.

📦 Installation

pip install py-countries-states-cities-database

📚 Usage

    from py_countries_states_cities_database import (
        get_all_cities,
        get_all_states,
        get_all_countries,
        get_all_sub_regions,
        get_all_regions,
        get_all_states_and_cities_nested,
        get_all_countries_and_states_nested,
        get_all_countries_and_cities_nested,
    )

    # All functions return a list of dictionaries
    print(get_all_cities())
    print(get_all_states())
    print(get_all_countries())
    print(get_all_sub_regions())
    print(get_all_regions())
    print(get_all_states_and_cities_nested())
    print(get_all_countries_and_states_nested())
    print(get_all_countries_and_cities_nested())

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

File details

Details for the file py_countries_states_cities_database-2.2.8.tar.gz.

File metadata

File hashes

Hashes for py_countries_states_cities_database-2.2.8.tar.gz
Algorithm Hash digest
SHA256 e95bbfd1b9f5a4ba692ee8677d907abafe3497abb9b71c2caf69ae1d7e46e29a
MD5 4fd5d8196a30cee8b8d5149a7edb3d5a
BLAKE2b-256 bb8ac373602e24b5ab2d29c480180c494e62789f077122a0bd6273b45cac32b6

See more details on using hashes here.

Provenance

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