/Ahantu

A python library for listing places in Rwanda. :rwanda: :rwanda:

Primary LanguagePythonMIT LicenseMIT

Rwanda Locations

Build Status Coverage Status Codacy Badge PyPI version

A Python library for listing locations in Rwanda

Installation

pip install rwalocation

Features

  1. All locations
  2. Provinces
  3. Places in a province
  4. Districts
  5. Places in a district
  6. Places that contain the specified name.

USAGE

Import modules

  • from rwalocation import location, province, district

  • import rwalocation

1.
>>> location()
>>> [{'id': '84b17f22-c14e-4931-98b2-bdf0cfd90090', 'country_code': 'RWA', 'country_name': 'RWANDA', ... ]

2.
>>> rwalocation.province()
>>> [{'province_name': 'EAST', 'province_code': 5}, {'province_name': 'NORTH', 'province_code': 4}, ...]

3. 
>>> rwalocation.province('Kigali')
>>> [{'id': '68028287-fe59-42ae-978e-5d24a37ada38', 'country_code': 'RWA', 'country_name': 'RWANDA', ...]

4.
>>> district()
>>> [{'district_name': 'Bugesera', 'district_code': 507, 'province_name': 'EAST'}, ...]

5.
>>> district('Kicukiro')
>>> [{'id': '84b17f22-c14e-4931-98b2-bdf0cfd90090', 'country_code': 'RWA', 'country_name': 'RWANDA', ...]

6.
>>> location('Rubashya') :> All locations which contain name "Rubashya"
>>> [{'id': '84b17f22-c14e-4931-98b2-bdf0cfd90090', 'country_code': 'RWA', 'country_name': 'RWANDA',... ]

DATA Spec

  1. Province
{ 
   'province_code':5,
   'province_name':'EAST',
}
  1. District
{ 
   'district_name':'Bugesera',
   'district_code':507,
   'province_name':'EAST'
}
  1. Location
{ 
   'id':'84b17f22-c14e-4931-98b2-bdf0cfd90090',
   'country_code':'RWA',
   'country_name':'RWANDA',
   'province_code':5,
   'province_name':'EAST',
   'district_code':501,
   'district_name':'Rwamagana',
   'sector_code':'050114',
   'sector_name':'Rubona',
   'cell_code':5011406,
   'cell_name':'Nawe',
   'village_code':501140603,
   'village_name':'Rudashya'
}

Contributing 🙏

Pull requests and potential features are welcome.

  1. Make all changes to your forked branch
  2. Submit a Pull Request.

Submit Issues 🐛

Facing any Issues or weird behavior(bug)? Feel free to open a new issue.

License

MIT Copyright © 2019, Kasule Joseph. All rights reserved.