Nepali municipalities is a python package to get data about Nepali municipalities based on districts
Project description
Nepal Municipalities
This is a simple and small python package contributed by me to get all list of municipalities of Nepal based on given districts of Nepal on latest version now you can autocomplete other info when municipalities name is given.
Contents
Installation Use the package manager pip to install nepal-sub-divisions.
To Autocomplete all info based on municipalities name provided for example if you provide municipalities names then rest of district and province will be autocompleted.
from nepal_municipalities import NepalMunicipality
print(NepalMunicipality.all_data_info('Kathmandu Metropolitan City'))
[{'municipality': 'Kathmandu Metropolitan City', 'district': 'Kathmandu', 'province': 'Bagmati', 'province_no': 'Province 3', 'country': 'Nepal'}]
print(NepalMunicipality.all_data_info('Ratuwamai Municipality'))
[{'municipality': 'Ratuwamai Municipality', 'district': 'Morang', 'province': 'Koshi', 'province_no': 'Province 1', 'country': 'Nepal'}]
print(NepalMunicipality.all_data_info('Ratuwamai'))
[{'municipality': 'Ratuwamai Municipality', 'district': 'Morang', 'province': 'Koshi', 'province_no': 'Province 1', 'country': 'Nepal'}]
print(NepalMunicipality.all_data_info('Rat'))
[{'municipality': 'Biratnagar Metropolitan City', 'district': 'Morang', 'province': 'Koshi', 'province_no': 'Province 1', 'country': 'Nepal'}, {'municipality': 'Ratuwamai Municipality', 'district': 'Morang', 'province': 'Koshi', 'province_no': 'Province 1', 'country': 'Nepal'}, {'municipality': 'Bharatpur Metropolitan City', 'district': 'Chitwan', 'province': 'Bagmati', 'province_no': 'Province 3', 'country': 'Nepal'}, {'municipality': 'Ratnanagar Municipality', 'district': 'Chitwan', 'province': 'Bagmati', 'province_no': 'Province 3', 'country': 'Nepal'}, {'municipality': 'Mahabharat Rural Municipality', 'district': 'Kavrepalanchowk', 'province': 'Bagmati', 'province_no': 'Province 3', 'country': 'Nepal'}, {'municipality': 'Pratappur Rural Municipality', 'district': 'Nawalparasi West', 'province': 'Lumbini', 'province_no': 'Province 5', 'country': 'Nepal'}, {'municipality': 'Dasharathchand Municipality', 'district': 'Baitadi', 'province': 'Sudurpashchim', 'province_no': 'Province 7', 'country': 'Nepal'}]
If No matching municipalities are supplied The Exception is thrown as below
No matching info for provided municipalities try changing spelling or try another name.
To get list of all districts of Nepal
from nepal_municipalities import NepalMunicipality
print(NepalMunicipality.districts("Koshi")) # search by province name
# ['Morang', 'Sankhuwasabha', 'Udayapur', 'Jhapa', ......]
To get list of all municipalities of Nepal based on District provided.
from nepal_municipalities import NepalMunicipality
print(NepalMunicipality.municipalities('Kathmandu'))
# ['Kathmandu', 'Kageshwori Manohara', 'Kirtipur', 'Gokarneshwor', 'Chandragiri', 'Tokha', 'Tarkeshwor', 'Dakchinkali', 'Nagarjun', 'Budhanilkantha', 'Shankharapur']
Contributing
Pull requests are welcome! Please feel free to reach out if you have any suggestions or encounter any bugs.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nepal_sub_divisions-0.0.7.tar.gz.
File metadata
- Download URL: nepal_sub_divisions-0.0.7.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f83461b3668d224efed99f6738f233f248a5794ad6e7ccb7afd88e1cf440c9d
|
|
| MD5 |
8265753dc3677c00d0278064d3b950c6
|
|
| BLAKE2b-256 |
2db456a8b8d3c0c2000a1aed75a60460e4fd17f60d36d9cbc4c1fc7ddcaeb051
|
File details
Details for the file nepal_sub_divisions-0.0.7-py3-none-any.whl.
File metadata
- Download URL: nepal_sub_divisions-0.0.7-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96460fa8ddcc69ed6b0b53634ac8ae805ac031849d7ee80e84438ac5371510c6
|
|
| MD5 |
2c388874e42d61e3baf063f69b821356
|
|
| BLAKE2b-256 |
7afbae099a9dd7cb860b6cf2931e8a5ce62bc36e894757e112aeae44017aecb3
|