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'}

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.5.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

nepal_sub_divisions-0.0.5-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nepal_sub_divisions-0.0.5.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for nepal_sub_divisions-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b9ccf0b14226c2421e6318f24eee2718524dd234056a7b957cbe93fe8bd67fc2
MD5 f4f101739fa2b4f3c10fb1e1287d10ba
BLAKE2b-256 f1e74c2d2463c2f7e038fb08d2cb6e69cf6fc5ac4d48303b38474cc3bc0eb3e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nepal_sub_divisions-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 981e16233f30272dec7b96721324c0b446c965d6f51b3d319b250378e875f936
MD5 1d1544f1a5f6da15c441db251c7149d5
BLAKE2b-256 0aef6c355a63e23054f51bb5f9660003667e72877e271c8df23e4229f2962243

See more details on using hashes here.

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