Skip to content Skip to sidebar Skip to footer

How To Define A Variable To Link My Google Sheets In Tkinter?

I'm learning Tkinter and i worked in a login interface, i have two entries for my username and password*, also one button for my login, I've defined a function for my entries and l

Solution 1:

Here is what works for me:

deflogear():
    # Rest of required code 
    user = entry_usuario.get() 
    contra = entry_contrasena.get()
    for i in c: # Loop through the listifint(user) == i['contraseña'] and contra == i['password']:  # Check if password and username exists in the dict
            messagebox.showinfo(title='login correcto', message='usuario y contraseña correctos')
            breakelse:
        messagebox.showerror(tittle=None, message='Detalles incorrectos')

Here the only problem I see is, username always have to be an int, so I recommend changing it to str so that its more efficient.

I dont know why you switched from SQLite to Google Sheets both will be insecure as you are storing passwords as plaintext, I recommend hashing it pre-hand and storing the hashed values. And as far as hosting of a database is concerned there are other online servers which allow MySQL database to be hosted, take a look here

Post a Comment for "How To Define A Variable To Link My Google Sheets In Tkinter?"