Skip to content

mnzipcodes is a simple library for querying Mongolian zip codes.

License

Notifications You must be signed in to change notification settings

bekkaze/mnzipcode-pypi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mnzipcode

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 


>>> mnzipcode.matching_by_zipcode(11000)
{
  'stat': 'capital', 
  'mnname': 'Улаанбаатар', 
  'name': 'Ulaanbaatar', 
  'year_established': 1942, 
  'area': 4704.4, 
  'population': 1539810, 
  'density': 327, 
  'zipcode': '11000'
}


>>> mnzipcode.filter(mnname='Дархан-Уул')
[
  {
    'stat': 'province', 
    'mnname': 'Дархан-Уул', 
    'name': 'Darkhan-Uul', 
    'year_established': 1994, 
    'area': 3275.0, 
    'population': 107018, 
    'density': 33, 
    'zipcode': '45000', 
    'capital': 'Darkhan', 
    'capitalmn': 'Дархан'}, 
  {
    'mnname': 'Дархан-Уул', 
    'zipcode': '81041'
  }, 
  {
    'mnname': 'Дархан-Уул', 
    'zipcode': '81063'
  }
]

>>> mnzipcode.is_real(11000)
True

>>> mnzipcode.similar_to(8501)
[
  {'mnname': 'Зүүнхангай', 
  'zipcode': '85010'
  }, 
  {
    'mnname': 'Даланбулаг', 
    'zipcode': '85011'
  }, 
  {
    'mnname': 'Хайрхан', 'zipcode': '85013'
  }, 
  {
    'mnname': 'Жаргалант', 
    'zipcode': '85015'
  }, 
  {
    'mnname': 'Баянгол', 
    'zipcode': '85017'
  }
]

About

mnzipcodes is a simple library for querying Mongolian zip codes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages