Skip to main content

Package of countries provinces and cities.

Project description

Countries Provinces and Cities

This project provides data for provinces/states and cities of various countries. Currently, the following countries are included:

  • Iran: Detailed list of provinces and cities.
  • Germany: Comprehensive list of federal states (Bundesländer) and their cities.

If you use languages other than Python and need these lists, you can access the JSON and MySQL Information through this repository.

Install

pip install provinces-and-cities

How to Use

from provinces_and_cities import Iran

Iran.main    # all provinces and main cities
Iran.all     # all provinces and all cities

Examlpe of data

Iran.main[7] = {
    "id": 8,
    "name": "تهران",
    "tel_prefix": "021",
    "cities": [
        "اسلامشهر",
        "بومهن",
        "پاكدشت",
        "تهران",
        "چهاردانگه",
        "دماوند",
        "رودهن",
        "ري",
        "شريف آباد",
        "شهر رباط كريم",
        "شهر شهريار",
        "فشم",
        "فيروزكوه",
        "قدس",
        "كهريزك",
        "لواسان بزرگ",
        "ملارد",
        "ورامين"
    ]
}

Future Plans

The project is designed to be scalable, and we plan to add data for other countries in the future. If you have suggestions for specific countries, feel free to contribute or create an issue.

Contributions

We welcome contributions to expand this project. If you'd like to add data for a new country or improve existing data, please create a pull request.

Support

If this project was helpful, please consider giving it a star. Your support helps us grow!

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

provinces_and_cities-1.0.4.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

provinces_and_cities-1.0.4-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file provinces_and_cities-1.0.4.tar.gz.

File metadata

  • Download URL: provinces_and_cities-1.0.4.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for provinces_and_cities-1.0.4.tar.gz
Algorithm Hash digest
SHA256 145d5a31ed311b7cb4bc473d4b7744ac2bbadee1809f5c480e23f88713e9879e
MD5 8a20e08e6a4447a39b0cd6ca9a38713a
BLAKE2b-256 f772a6904364893d590fb3e7cc7a59d2d7d19a6a28101a4ffd4f153e60c518d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for provinces_and_cities-1.0.4.tar.gz:

Publisher: publish.yml on mohammad-prb/provinces-and-cities-pypi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file provinces_and_cities-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for provinces_and_cities-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f21d0fbc5f8b75682433460cec4cecb6a5a1ffd42ecf2a86b55b0ba5952f0766
MD5 603f7d2e4552ac2e48fae200d285f86d
BLAKE2b-256 cf47b023382797aeb819670d8b1d0a224192bce4d5462424f2e011444c8e3b15

See more details on using hashes here.

Provenance

The following attestation bundles were made for provinces_and_cities-1.0.4-py3-none-any.whl:

Publisher: publish.yml on mohammad-prb/provinces-and-cities-pypi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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