## API 🚀
🎉 Introducing **API** for Countries States Cities Database.
### 📦 Installation
```bash
pip install py-countries-states-cities-database
```
### 📚 Usage
```python
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,
get_file_path
)
# 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())
# File name options
| "cities.json"
| "states.json"
| "countries.json"
| "subregions.json"
| "regions.json"
| "countries+cities.json"
| "countries+states.json"
| "states+cities.json"
| "countries+states+cities.json",
# Get the file path
print(get_file_path("cities.json"))
```
Raw data
{
"_id": null,
"home_page": "https://github.com/umer2001/py_countries_states_cities_database",
"name": "py-countries-states-cities-database",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "countries states cities database",
"author": "Umer Farooq",
"author_email": "umer2001.uf@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b5/18/d54bfe4c680cecb2abf69cbec199e5b048759235db4f85f4f67e2ff39a23/py_countries_states_cities_database-2.2.13.tar.gz",
"platform": null,
"description": "## API \ud83d\ude80\n\n\ud83c\udf89 Introducing **API** for Countries States Cities Database.\n\n### \ud83d\udce6 Installation\n\n```bash\npip install py-countries-states-cities-database\n```\n\n### \ud83d\udcda Usage\n\n```python\n from py_countries_states_cities_database import (\n get_all_cities,\n get_all_states,\n get_all_countries,\n get_all_sub_regions,\n get_all_regions,\n get_all_states_and_cities_nested,\n get_all_countries_and_states_nested,\n get_all_countries_and_cities_nested,\n get_file_path\n )\n\n # All functions return a list of dictionaries\n print(get_all_cities())\n print(get_all_states())\n print(get_all_countries())\n print(get_all_sub_regions())\n print(get_all_regions())\n print(get_all_states_and_cities_nested())\n print(get_all_countries_and_states_nested())\n print(get_all_countries_and_cities_nested())\n\n\n # File name options\n | \"cities.json\"\n | \"states.json\"\n | \"countries.json\"\n | \"subregions.json\"\n | \"regions.json\"\n | \"countries+cities.json\"\n | \"countries+states.json\"\n | \"states+cities.json\"\n | \"countries+states+cities.json\",\n\n # Get the file path\n print(get_file_path(\"cities.json\"))\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package to get countries, states and cities information",
"version": "2.2.13",
"project_urls": {
"Homepage": "https://github.com/umer2001/py_countries_states_cities_database"
},
"split_keywords": [
"countries",
"states",
"cities",
"database"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b518d54bfe4c680cecb2abf69cbec199e5b048759235db4f85f4f67e2ff39a23",
"md5": "30c5090ff0b5d9375bdc30d300675760",
"sha256": "7ad071d0cc976e88d641b4c20faae18f6908c56039cbfaa84c04b7e0b1dcd9d9"
},
"downloads": -1,
"filename": "py_countries_states_cities_database-2.2.13.tar.gz",
"has_sig": false,
"md5_digest": "30c5090ff0b5d9375bdc30d300675760",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26866381,
"upload_time": "2024-06-09T14:14:20",
"upload_time_iso_8601": "2024-06-09T14:14:20.134737Z",
"url": "https://files.pythonhosted.org/packages/b5/18/d54bfe4c680cecb2abf69cbec199e5b048759235db4f85f4f67e2ff39a23/py_countries_states_cities_database-2.2.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-09 14:14:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "umer2001",
"github_project": "py_countries_states_cities_database",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "py-countries-states-cities-database"
}