The above code is divided into different functions which include,
welcome()
home(address)
login()
register()
validate(address, password)
addToDatabase(address, password)
transfer(address)
The welcome()
function is called iniially and then different functions are returned according to the instructions.
ipywidgets
- To create basic widgets. Click here.IPython.display
- To displaye the created widgets. Click here.pymongo
- To establish a connection to the MongoDB server. Click here.urllib
- To enter the cluster credentials. Click here.
The steps to establish a secure connection are given here.
- Get access to the cluster.
- Access the database.
- Access the collection and make changes on it.
When the code is run, initially, welcome()
function is called manually.
Later on, different functions are returned based on a particular condition as,
if cond1:
return func1()
else:
return func2()
Only few widgets are used here
Button
Text
Password
These methods have parameters which modify them.
Any change to the collection in any row is updated directly to the database.
Like,
collection.update_one(myquery_debit, newvalues_debit)
This code makes use of database to store and access accounts.
We can either
- Create a new account in the database
or
- Modify the account
As the code makes use of databse, we can store info of many people. As the code progresses according to conditions, it is secure to use.
We can implement this in many Banking Applications.