Geographical database for internal projects.
Project description
WebCase Geographical database
Installation
pip install wc-django-geo-db
In settings.py
:
INSTALLED_APPS += [
'wcd_geo_db',
'wcd_geo_db.contrib.admin',
'wcd_geo_db_sources',
]
Usage
from wcd_geo_db.client import GeoClient
from wcd_geo_db.conf import Settings
from wcd_geo_db.modules.code_seeker import registry
from wcd_geo_db_sources.sources.koatuu import KOATUU_SEEKER
from wcd_geo_db_sources.sources.novaposhta import NOVAPOSHTA_SEEKER
client = GeoClient(settings=Settings(), code_seeker_registry=registry)
registry.register(KOATUU_SEEKER)
registry.register(NOVAPOSHTA_SEEKER)
client.bank.divisions.get(ids=(1,))
found = client.bank.divisions.find(levels=(DivisionLevel.ADMINISTRATIVE_LEVEL_1,))
descendants = client.bank.divisions.find_descendants(ids=found)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wc-django-geo-db-0.1.0.tar.gz
(13.7 kB
view hashes)