Socket
Book a DemoInstallSign in
Socket

django-mikoa

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-mikoa

Django app for Tanzania Regions and Districts

0.0.3
pipPyPI
Maintainers
1

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

  • Run pip install django-mikoa
  • Add mikoa to INSTALLED_APPS
  • 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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.