
import requests

try:
						from django.contrib.auth import authenticate, login
						from django.shortcuts import redirect, render
except ImportError:
						SCREAMING_SNAKE_CASE   :		Tuple					 =       print



def        lowerCamelCase_  (   __UpperCamelCase     ):
				# Enter your recaptcha secret key here
				A_       	=  '''secretKey'''
				A_       	=  '''https://www.google.com/recaptcha/api/siteverify'''

				# when method is not POST, direct user to login page
				if request.method != "POST":
								return render(__UpperCamelCase ,						'''login.html'''     )

				# from the frontend, get username, password, and client_key
				A_       	=  request.POST.get('''username'''     )
				A_       	=  request.POST.get('''password'''     )
				A_       	=  request.POST.get('''g-recaptcha-response'''     )

				# post recaptcha response to Google's recaptcha api
				A_       	=  requests.post(__UpperCamelCase ,						data={'''secret''': secret_key, '''response''': client_key}     )
				# if the recaptcha api verified our keys
				if response.json().get('''success''' ,						__UpperCamelCase     ):
								# authenticate the user
								A_       	=  authenticate(__UpperCamelCase ,						username=__UpperCamelCase ,						password=__UpperCamelCase     )
								if user_in_database:
												login(__UpperCamelCase ,						__UpperCamelCase     )
												return redirect('''/your-webpage'''     )
				return render(__UpperCamelCase ,						'''login.html'''     )

from collections import namedtuple

SCREAMING_SNAKE_CASE   :		Any					 =       namedtuple("from_to", "from_ to")

SCREAMING_SNAKE_CASE   :		str					 =       {
    "atm": from_to(1, 1),
    "pascal": from_to(0.0000098, 10_1325),
    "bar": from_to(0.986923, 1.01325),
    "kilopascal": from_to(0.00986923, 101.325),
    "megapascal": from_to(9.86923, 0.101325),
    "psi": from_to(0.068046, 14.6959),
    "inHg": from_to(0.0334211, 29.9213),
    "torr": from_to(0.00131579, 760),
}



def        lowerCamelCase_  (   __UpperCamelCase ,						__UpperCamelCase ,						__UpperCamelCase     ):
				if from_type not in PRESSURE_CONVERSION:
								raise ValueError(
								    F"Invalid 'from_type' value: {from_type!r}  Supported values are:\n"
								    + ''', '''.join(__UpperCamelCase     )     )
				if to_type not in PRESSURE_CONVERSION:
								raise ValueError(
								    F"Invalid 'to_type' value: {to_type!r}.  Supported values are:\n"
								    + ''', '''.join(__UpperCamelCase     )     )
				return (
				    value * PRESSURE_CONVERSION[from_type].from_ * PRESSURE_CONVERSION[to_type].to
				)


if __name__ == "__main__":
						import doctest

						doctest.testmod()