Skip to content

Ayush5120/Assignment1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Assignment 1

Tasks Completed:

  • Created an API which takes pincode as a query parameter and returns the city and state as a result.
  • Created a Address Form which takes the input as Zipcode and automatically fills the City and State fields corresponding to the code entered.
  • Finally Stored the Data submitted by the user in the database.

Prerequisites

Clone repository

git clone https://github.com/Ayush5120/Assignment1.git

Traverse to app directory

cd Form

Deploy MongoDB container Ensure you have the following software installed:

  • Docker (version 20.10.12) or higher

Start MongoDB Container

docker pull mongo
docker create -it --name MongoTest -p 27017:27017 mongo
docker start MongoTest

Run Project Using

Create Virtual environment (optional)

virtualenv env
source env/bin/activate

Make sure to be in Forms folder

pip install -r requirements.txt
python3 app.py

Visit the Address Form at

http://localhost:5001/forms

To use the Pincode API:

Get the state,city corresponding to the zip code by passing query parameter as shown:

http://localhost:5001/pincodes?pin=121004

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published