Prerequisites
Before you begin, ensure you have the following installed:- Python 3.9 or higher
- pip (Python package installer)
- Git
Installation Steps
Install Dependencies
Install all required Python packages from The following packages will be installed:
requirements.txt:Configure Environment Variables
Set up the required environment variable for the data source URL. See the Environment Variables page for detailed configuration.Create a
.env file in the project root:The application fetches administrative division data from the URL specified in
NEPAL_ADMIN_DATA_URL. If the URL is unavailable, it will fall back to the local data/updated_nepal_data.json file.Access the Application
Open your web browser and navigate to:
- Web Interface:
http://localhost:5000 - API Documentation:
http://localhost:5000/docs
- Browse provinces, districts, and municipalities
- Search functionality for administrative divisions
- Interactive data visualization
Development Features
When running in debug mode (default for local development), the application includes:- Auto-reload: The server automatically restarts when you modify code files
- Debug mode: Detailed error messages and stack traces
- Swagger UI: Interactive API documentation at
/docs
API Endpoints
Once running, you can test the following API endpoints:Troubleshooting
Common Issues
Port already in use: If port 5000 is already in use, modifyapp.py to use a different port:
Next Steps
- Learn about Vercel deployment
- Configure environment variables
- Explore the API using the Swagger documentation at
/docs