mnzipcodes is a simple library for querying Mongolian zip codes.
Project description
mnzipcode is a simple library for querying Mongolian zip codes.
Installation
mnzipcode is available on PyPi:
# python -m pip install mnzipcode
Example usage:
>>> import mnzipcode
>>>
>>> obj = mnzipcode.ZipCode()
>>>
>>> obj.matching_by_zipcode(11000)
{'name': 'Ulaanbaatar', 'stat': 'province', 'mnname': 'Улаанбаатар', 'year_established': 1942, 'area': 4704.4, 'population': 1539810, 'density': 327}
>>>
>>> obj.matching_by_name('Дархан-Уул')
[{'name': 'Darkhan-Uul', 'zipcode': '45000', 'stat': 'province', 'mnname': 'Дархан-Уул', 'year_established': 1994, 'area': 3275.0, 'population': 107018, 'density': 33}, {'name': 'Дархан-Уул', 'zipcode': '81041', 'stat': 'bag'}, {'name': 'Дархан-Уул', 'zipcode': '81063', 'stat': 'bag'}]
>>>
>>> obj.isReal(11000)
True
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
mnzipcode-0.0.9.tar.gz
(25.2 kB
view hashes)