This is a FastAPI project that provides an API to retrieve information about provinces, districts, and municipalities in Nepal. The project uses Python and the FastAPI framework.
- All the endpoints can be found here https://neapl-provience-district.onrender.com/
To run this project, please follow the steps below:
- Clone the repository:
git clone https://github.com/sudan94/nepal-provience-district.git
cd nepal-provience-district
- Create and activate a virtual environment (optional but recommended):
python3 -m venv venv
source venv/bin/activate
- Install the dependencies from the
requirements.txt
file:
pip install -r requirements.txt
Once you have installed the required dependencies, you can serve the API using FastAPI.
To start the FastAPI server, run the following command:
uvicorn main:app --reload
This will start the server and automatically reload it whenever code changes are detected.
Once the FastAPI server is running, you can access the API endpoints using a web browser or a tool like cURL or Postman.
The API provides the following endpoints:
- Once the app is running all endpints can found here http://127.0.0.1:8000/docs
The data used in this API is taken from the Nepal Data repository by sandipbgt. Make sure to check the repository for any updates or additional data.
If you'd like to contribute to this project, you can follow these steps:
- Fork the repository on GitHub.
- Create a new branch with a descriptive name for your feature or bug fix.
- Make your changes and commit them with clear commit messages.
- Push your changes to your forked repository.
- Submit a pull request to the original repository, describing the changes you have made.
This project is licensed under the MIT License.