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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
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
serbia_zip_codes-1.0.0.tar.gz
(16.5 kB
view hashes)
Built Distribution
Close
Hashes for serbia_zip_codes-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9fba184a63d562c427cc0de48393c7a756942a3cf41c54a33fec025487857ab |
|
MD5 | e057f9067c1eac75e138a4cfb7314093 |
|
BLAKE2b-256 | 02bc2bfc974745f16daa43c2a9406802a5d58da673d3dab734eae8c2462bf20b |