Skip to main content

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

Project description

Nepali 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'))
[{'province': 'Province 3', 'country': 'Nepal', 'id': 311, 'district': 'Kathmandu', 'name': 'Kathmandu'}]

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 nepali_municipalities import NepalMunicipality

print(NepalMunicipality.all_districts()) # this will also give the same result
# ['Bhojpur', 'Dhankuta', 'Ilam', 'Jhapa', ......]

print(NepalMunicipality.all_districts("Koshi")) # search by province name
# ['Morang', 'Sankhuwasabha', 'Udayapur', 'Jhapa', ......]

To get list of all municipalities of Nepal based on District provided.

from nepali_municipalities import NepalMunicipality

print(NepalMunicipality.municipalities('Kathmandu'))

# ['Kathmandu', 'Kageshwori Manohara', 'Kirtipur', 'Gokarneshwor', 'Chandragiri', 'Tokha', 'Tarkeshwor', 'Dakchinkali', 'Nagarjun', 'Budhanilkantha', 'Shankharapur']

Contributing

PRs are welcomed. Please, let me know if you have any suggestions or find 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.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

nepal_sub_divisions-0.0.1-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page