A Python library for listing locations in Rwanda
pip install rwalocation
- All locations
- Provinces
- Places in a province
- Districts
- Places in a district
- Places that contain the specified name.
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',... ]
- Province
{
'province_code':5,
'province_name':'EAST',
}
- District
{
'district_name':'Bugesera',
'district_code':507,
'province_name':'EAST'
}
- 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'
}
Pull requests and potential features are welcome.
- Make all changes to your forked branch
- Submit a Pull Request.
Facing any Issues or weird behavior(bug)? Feel free to open a new issue.
MIT Copyright © 2019, Kasule Joseph. All rights reserved.