diff --git a/__pycache__/crypto.cpython-38.pyc b/__pycache__/crypto.cpython-38.pyc index 5fad2b8f..5a573b47 100644 Binary files a/__pycache__/crypto.cpython-38.pyc and b/__pycache__/crypto.cpython-38.pyc differ diff --git a/__pycache__/flight.cpython-38.pyc b/__pycache__/flight.cpython-38.pyc index 8d10eda7..09a954c3 100644 Binary files a/__pycache__/flight.cpython-38.pyc and b/__pycache__/flight.cpython-38.pyc differ diff --git a/__pycache__/weathers.cpython-38.pyc b/__pycache__/weathers.cpython-38.pyc index 94eaeaa9..f50cc1e6 100644 Binary files a/__pycache__/weathers.cpython-38.pyc and b/__pycache__/weathers.cpython-38.pyc differ diff --git a/crypto.py b/crypto.py index 948dead2..3d748d2d 100644 --- a/crypto.py +++ b/crypto.py @@ -11,7 +11,9 @@ def coin(): 'x-rapidapi-key': "ca396c8c62mshf51f177a6611b4ap1cf15ajsnb909632c0ce7" } - response = requests.request("POST", url, data=payload, headers=headers) + response = requests.request( + "POST", url, data=payload, + headers=headers) datas = response.json() token = datas['access_token'] @@ -19,13 +21,17 @@ def coin(): print(response.text) url = "https://bravenewcoin.p.rapidapi.com/market-cap" - querystring = {"assetId":" f1ff77b6-3ab4-4719-9ded-2fc7e71cff1f"} + querystring = { + "assetId":" f1ff77b6-3ab4-4719-9ded-2fc7e71cff1f" + } headers = { 'authorization': f"Bearer {token}", 'x-rapidapi-host': "bravenewcoin.p.rapidapi.com", 'x-rapidapi-key': "ca396c8c62mshf51f177a6611b4ap1cf15ajsnb909632c0ce7" } - response = requests.request("GET", url, headers=headers, params=querystring) + response = requests.request( + "GET", url, headers=headers, + params=querystring) dic = response.json() print(dic) diff --git a/flight.py b/flight.py index 4072d815..9708893d 100644 --- a/flight.py +++ b/flight.py @@ -2,7 +2,9 @@ def flight_message(arrival, departure): url = f"https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/browsequotes/v1.0/IN/INR/en-US/{departure}-sky/{arrival}-sky/anytime" - querystring = {"inboundpartialdate": "2019-12-01"} + querystring = { + "inboundpartialdate": "2019-12-01" + } headers = { 'x-rapidapi-key': "ca396c8c62mshf51f177a6611b4ap1cf15ajsnb909632c0ce7", diff --git a/main.py b/main.py index 1dacf463..2035e47b 100644 --- a/main.py +++ b/main.py @@ -74,7 +74,10 @@ def user(): db['password'] += password form.password.data = '' flash("Cool, you're signed up ") - return render_template('user.html', name = name, form = form) + return render_template( + 'user.html', name = name, + form = form + ) @app.route('/iss', methods=['GET', 'POST']) def iss_page(): @@ -85,7 +88,10 @@ def iss_page(): name = form.name.data form.name.data = '' flash(iss.message()) - return render_template('iss.html', name=name, form=form) + return render_template( + 'iss.html', name=name, + form=form + ) @app.route('/tax', methods=['GET', 'POST']) def tax_page(): @@ -107,7 +113,11 @@ def tax_page(): flash('Total, Tax, Pre-Tax Total & Tax Amount - That Easy! Refer Us. ') - return render_template('tax.html', total=total,tax=tax,pre_tax=round(pre_tax, 2),tax_amount=round(tax_amount, 2),form=form) + return render_template( + 'tax.html', total=total,tax=tax, + pre_tax=round(pre_tax, 2),tax_amount=round(tax_amount, 2), + form=form + ) @app.route('/flight', methods=['GET', 'POST']) def flight_page(): @@ -126,7 +136,10 @@ def flight_page(): flash(x[1]) #os.system("python iss.py") #iss.send_msg(number) - return render_template('flights.html',arrival=arrival,departure=departure,form=form) + return render_template( + 'flights.html',arrival=arrival, + departure=departure,form=form + ) @app.route('/weathers', methods=['GET', 'POST']) def weathery(): @@ -140,7 +153,10 @@ def weathery(): flash(x) #os.system("python iss.py") #iss.send_msg(number) - return render_template('weather.html',name=name,form=form) + return render_template( + 'weather.html', + name=name,form=form + ) @app.route('/crypto', methods=['GET', 'POST']) def btc(): @@ -157,7 +173,10 @@ def btc(): flash(result[3]) flash(result[4]) flash(result[5]) - return render_template('crypto.html', name = name, form = form) + return render_template( + 'crypto.html', name = name, + form = form + ) if __name__ == '__main__': - app.run(debug=True, host='0.0.0.0', port=8080) + app.run(debug=False, host='0.0.0.0', port=8080) diff --git a/templates/base.html b/templates/base.html index 515d7b56..9695ea8a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,7 +8,7 @@ -