Pincode lookup API for autofill regions and districts from Tanzania during checkout.
# πΉπΏ Tanzania Pincode Lookup API
> ## π© **This project is 100% complete** π
>
> `ββββββββββββββββββββββββββββββββββββββββ 100%`
A lightweight **FastAPI** service for looking up Tanzanian regions, cities, and districts from a 6-digit pincode.
The API is designed for applications such as **e-commerce checkout forms**, where a customer enters a pincode and the corresponding location information can be automatically populated.
## β¨ Features
* π Look up a location using a 6-digit pincode
* π¦ Perform bulk pincode lookups
* πΉπΏ Tanzania-focused location data
* β
Automatic pincode validation using Pydantic
* β‘ Fast API powered by FastAPI
* π‘οΈ Custom error handling for invalid and unknown pincodes
* π Interactive API documentation through FastAPI
* π§© Easy to integrate with checkout and address forms
## π οΈ Tech Stack
* **Python**
* **FastAPI**
* **Pydantic**
* **Uvicorn**
## π Project Structure
```text
πΉπΏ EMTAA β Tanzania Pincode Lookup API
β
βββ π Scripts/
β βββ βοΈ Supporting / utility scripts
β
βββ π main.py
β βββ π FastAPI application entry point
β βββ API routes
β βββ Pincode lookup
β βββ Bulk lookup
β βββ Request / response handling
β
βββ π models.py
β βββ π§© Pydantic data models
β βββ Request schemas
β βββ Response schemas
β βββ Data validation
β
βββ π data.py
β βββ πΉπΏ Tanzania pincode/location dataset
β βββ Regions
β βββ Cities
β βββ Districts
β
βββ π exceptions.py
β βββ β οΈ Custom API exceptions
β βββ Invalid pincode
β βββ Pincode not found
β βββ Validation errors
β
βββ π requirements.txt
β βββ π¦ Python dependencies
β βββ FastAPI
β βββ Pydantic
β βββ Uvicorn
β
βββ π README.md
β βββ π Project documentation
β βββ Features
β βββ Installation
β βββ API usage
β βββ Examples
β
βββ π .gitignore
β βββ π« Ignored files / directories
β
βββ π pyvenv.cfg
βββ π Python virtual-environment configuration
βββββββββββββββββββββββββββ
β Cli β¦