Inspired by the dvhcvn repo by daohoangson, but at the same time can't understand PHP, this is a python implementation of retrieving and outputting Vietnam's Administrative Subdivision WebService into a json format that's easier for web consumption.
Interested users should download or use directly:
Since Vietnam's administrative subdivisions are surprisingly dynamic given how often there are changes, it might be better to automate retrieiving your own data.
The script, retrieving_subdivisions.py, is very simple. It creates a request
with the most expansive parameters to all three webservices provided regarding provinces, districts, and wards, then parse and output the json accordingly.
Usage is as simple as:
$ python3 retrieving_subdivisions.py
Dependencies are generated with pipreqs
and stored in requirements.txt.
To add dependencies to poetry use:
$ poetry add `cat requirements.txt`