Skip to main content

Easy access to Serbia zip codes. You can search zip code by city, or city by zip code

Project description

Serbia zip codes

Easy access to Serbia zip codes. You can search zip code by city, or city by zip code.

Installation

pip install serbia-zip-codes

Usage

import serbia_zip_codes

Search city by city:

>>> result = serbia_zip_codes.find_by_city("Loznica")
>>> print(result)
[{'city': 'Loznica', 'zip_code': '15300'}]
>>> print(result[0]['zip_code'])
15300

Search city by zip code:

>>> result = serbia_zip_codes.find_by_zip("15300")
>>> print(result)
[{'city': 'Loznica', 'zip_code': '15300'}]
>>> print(result[0]['city'])
Loznica

Multiple results example:

>>> from pprint import pprint
>>> import serbia_zip_codes
>>> result = serbia_zip_codes.find_by_city("beograd")
>>> pprint(result)
[{'city': 'Beograd', 'zip_code': '11000'},
 {'city': 'Beograd Voždovac', 'zip_code': '11010'},
 {'city': 'Beograd Čukarica', 'zip_code': '11030'},
 {'city': 'Beograd Zvezdara', 'zip_code': '11050'},
 {'city': 'Beograd Palilula', 'zip_code': '11060'},
 {'city': 'Beograd Zemun', 'zip_code': '11080'},
 {'city': 'Beograd Rakovica', 'zip_code': '11090'}]

Get all:

>>> result = serbia_zip_codes.get_all()
>>> pprint(result)
[{'city': 'Beograd', 'zip_code': '11000'},
 {'city': 'Beograd Voždovac', 'zip_code': '11010'},
 {'city': 'Beograd Čukarica', 'zip_code': '11030'},
 {'city': 'Beograd Zvezdara', 'zip_code': '11050'},
 {'city': 'Beograd Palilula', 'zip_code': '11060'},
 {'city': 'Novi Beograd', 'zip_code': '11070'},
 {'city': 'Beograd Zemun', 'zip_code': '11080'},
 {'city': 'Beograd Rakovica', 'zip_code': '11090'},
 {'city': 'Kaluđerica', 'zip_code': '11130'},
 {'city': 'Rušanj', 'zip_code': '11194'},
 {'city': 'Borča', 'zip_code': '11211'},
 {'city': 'Ovča', 'zip_code': '11212'},
 {'city': 'Padinska Skela', 'zip_code': '11213'},
 {'city': 'Beli Potok', 'zip_code': '11223'},
 {'city': 'Vrčin', 'zip_code': '11224'},
 {'city': 'Zuce', 'zip_code': '11225'},
 {'city': 'Pinosava', 'zip_code': '11226'},
 {'city': 'Ripanj', 'zip_code': '11232'},
 {'city': 'Ralja', 'zip_code': '11233'},
 {'city': 'Mali Požarevac', 'zip_code': '11235'},
 {'city': 'Ostružnica', 'zip_code': '11251'},
 {'city': 'Sremčica', 'zip_code': '11253'},
 {'city': 'Umka', 'zip_code': '11260'},
 {'city': 'Mala Moštanica', 'zip_code': '11261'},
 {'city': 'Velika Mostanica', 'zip_code': '11262'},
 {'city': 'Surčin', 'zip_code': '11271'},
 {'city': 'Dobanovci', 'zip_code': '11272'},
...

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

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

serbia_zip_codes-1.0.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

serbia_zip_codes-1.0.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file serbia_zip_codes-1.0.0.tar.gz.

File metadata

  • Download URL: serbia_zip_codes-1.0.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for serbia_zip_codes-1.0.0.tar.gz
Algorithm Hash digest
SHA256 993a45068b5e8a754924f564be8eb621845888128fe16580b6f1b0f9aac0b83e
MD5 551714b8986c515e8d112434ca2e8186
BLAKE2b-256 96265e2da743923c81a445b10abd89e29c3bd7aecfe91b6d5236cb4c70e4d8a6

See more details on using hashes here.

File details

Details for the file serbia_zip_codes-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: serbia_zip_codes-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for serbia_zip_codes-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9fba184a63d562c427cc0de48393c7a756942a3cf41c54a33fec025487857ab
MD5 e057f9067c1eac75e138a4cfb7314093
BLAKE2b-256 02bc2bfc974745f16daa43c2a9406802a5d58da673d3dab734eae8c2462bf20b

See more details on using hashes here.

Supported by

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