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!
Release files for provinces-and-cities 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| provinces_and_cities-1.0.4.tar.gz | 17.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| provinces_and_cities-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.2 kB
Release files / provinces_and_cities-1.0.4.tar.gz
| Download URL | provinces_and_cities-1.0.4.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
145d5a31ed311b7cb4bc473d4b7744ac2bbadee1809f5c480e23f88713e9879e
|
|
BLAKE2b-256 checksum How to use checksums |
f772a6904364893d590fb3e7cc7a59d2d7d19a6a28101a4ffd4f153e60c518d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2025.
Transparency logRelease files / provinces_and_cities-1.0.4-py3-none-any.whl
| Download URL | provinces_and_cities-1.0.4-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f21d0fbc5f8b75682433460cec4cecb6a5a1ffd42ecf2a86b55b0ba5952f0766
|
|
BLAKE2b-256 checksum How to use checksums |
cf47b023382797aeb819670d8b1d0a224192bce4d5462424f2e011444c8e3b15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2025.
Transparency log