Skip to main content

Nepali municipalities is a python package to get data about Nepali municipalities based on districts

Project description

Nepal Municipalities

Downloads

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

MIT

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

nepal_sub_divisions-0.0.9.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

nepal_sub_divisions-0.0.9-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file nepal_sub_divisions-0.0.9.tar.gz.

File metadata

  • Download URL: nepal_sub_divisions-0.0.9.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for nepal_sub_divisions-0.0.9.tar.gz
Algorithm Hash digest
SHA256 a7a9fb27ac949bb98253e9f65f9b945e950f0e9a9ca37ed6f757faa2027f6a1d
MD5 b99e7cb4ab672d1c7128fe0e32407666
BLAKE2b-256 30cd70ede09eaeba12c4b5b9933375ac435944762c1929009a49db0e68570c38

See more details on using hashes here.

File details

Details for the file nepal_sub_divisions-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for nepal_sub_divisions-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e81a983801ef5728f3d3fbfea22d2fd0bf6955ffed8aea247f7de678f151832e
MD5 4edd22d0c95d5bfc1480f22afecfd9ec
BLAKE2b-256 1831ff234153488439ceb717f99f9ce0173c2dadff1048531bc33aa0938ee61e

See more details on using hashes here.

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