Skip to main content

django-mikoa

A Django application consisting of all Tanzania locations from Regions to District.

Prerequisites

  • Python 3.6+
  • Pip or Pipenv

It will Cover

  • Regions (region, capital, number of districts, area, population, postcode and zone)
  • Districts (district, region, population)
  • Wards
  • Vilage/Streets

Installation

This package is available in Python Package Index and can be installed using pip or pipenv

  1. Run pip install django-mikoa
  2. Add mikoa to INSTALLED_APPS
  3. Run python manage.py migrate

Usage

To access Tanzania Regions

from mikoa.models import Region
regions = Region.objects.all()

print(regions)

To access Tanzania Districts

from mikoa.models import District
districts = District.objects.all()

print(districts)

To access all Districts of Certain Region

from mikoa.models import Region, District
regions = Region.objects.all()

for region in regions:
    for district in region.district_set.all():
        print(district.region.name)
        print(district.name)   

Give it a star

If you found this repository useful, give it a star so as the whole galaxy of developer can get to know it.

Bug bounty?

If you encounter issue with the usage of the package, feel free raise an issue so as we can fix it as soon as possible(ASAP).

Pull Requests

If you have something to add I welcome pull requests on improvement , you're helpful contribution will be merged as soon as possible

Disclaimer

All the location I used to build this repository, I got from an public repository titled tanzania-locations-db, I'm not responsible for any kind of misinformation in it, So use it to your own risk

Metadata

Release files for django-mikoa 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-mikoa 0.0.3
File Interpreter ABI Platform
django_mikoa-0.0.3-py3-none-any.whl Python 3 none any Details

Release files / django_mikoa-0.0.3-py3-none-any.whl

Download URL django_mikoa-0.0.3-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f534484fed86c189ac67f682e1d5b93e715923ec4a39397e82d45cb76043527
BLAKE2b-256 checksum
How to use checksums
a5991929888db90348a8a3b7d8ea47744a9eb7139a9b374c05071df59d4dfbf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page