File: login.py

package info (click to toggle)
magicgui 0.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,796 kB
  • sloc: python: 11,202; makefile: 11; sh: 9
file content (20 lines) | stat: -rw-r--r-- 495 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""# Password login

A password login field widget.
"""

from magicgui import magicgui


# note that "password" is a special keyword argument
# it will create a password field in the gui by default
# (unless you override "widget_type")
# whereas "password2" will be a normal text field
# (unless you override "widget_type")
@magicgui(password2={"widget_type": "Password"})
def login(username: str, password: str, password2: str):
    """User login credentials."""
    ...


login.show(run=True)