Skip to content

hongquan/vn-open-api-provinces

Repository files navigation

Viet Nam province API

Homepage: https://provinces.open-api.vn

This is online tool to let my VietnamProvinces library reach more users. VietnamProvinces is a Python library, so it can only be used in Python application. By building an online tool on top of it, I hope to help Viet Nam standard data reach more application developers, easpecially web frontend application, where inclusion of big JSON file is not an optimized option. In the end, it can help businesses collaborate better (by using the same standard data) and benefit people.

The online tool can be self-hosted. The public instance is sponsored by OMZCloud.

Development guide

If you want to join development, this is what you want to know:

The code consists of two parts:

  • Landing page: A static HTML page, built with Zola. CSS is based on UnoCSS.
  • API backend: Written in Python, based on FastAPI framework.

Assume that you already install all dependencies.

  • To build landing page, run at the top-level folder:

    zola build
  • To run the backend, run at the top-level folder:

    uvicorn api.main:app
  • When deploying to a live system, we need to route URLs to landing page and the backend. Look into Deployment/Nginx for example.

  • If you modify HTML code in landing page, chance that you are adding new CSS classes and you don't see update. You need to run this command again:

    just build-css

Credit

Brought to you by Nguyễn Hồng Quân.

About

Open API to list Viet Nam administrative divisions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published