Skip to main content

mnzipcode is a simple library for querying Mongolian zip codes.

Project description

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'
  }
]

Project details


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.1.24.tar.gz (18.5 kB view details)

Uploaded Source

File details

Details for the file mnzipcode-0.1.24.tar.gz.

File metadata

  • Download URL: mnzipcode-0.1.24.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for mnzipcode-0.1.24.tar.gz
Algorithm Hash digest
SHA256 85d3044da24abf41e763573ab8b9a1d7047110cc6594b26f7d253c4671682496
MD5 a07c4833ee0ab5e190ea852cdd21dc64
BLAKE2b-256 a4f0d352d8a8fa515734bb1c7fefed290023aa25eae16a045cc79c4d66f6e27e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page