tcurl_login¶
Credential collection using Urwid with password masking Equivalent to dialog –form but with modern curses features Colors match the classic dialog blue theme
Module Contents¶
Classes¶
Pile that treats Enter like Tab on edit fields. |
|
Urwid form for collecting credentials with masking |
Functions¶
Show credential form and return results |
|
Create and configure the command-line argument parser. |
|
Data¶
API¶
- tcurl_login.VERSION¶
‘2026.05-DEV’
- class tcurl_login.FormPile¶
Bases:
urwid.PilePile that treats Enter like Tab on edit fields.
- keypress(size, key)¶
- _focus_is_edit()¶
Check if the current focus chain ends at an Edit widget.
- tcurl_login.PALETTE¶
[(‘body’, ‘white’, ‘light blue’), (‘title’, ‘white’, ‘light blue’, ‘bold’), (‘prompt’, ‘yellow’, ‘li…
- class tcurl_login.CredentialForm(defaults: dict[str, str] | None = None)¶
Urwid form for collecting credentials with masking
Initialization
- _on_otp_change(widget: urwid.Edit, old_text: str) None¶
Strip non-digit characters and show a status message
- on_submit(button: urwid.Button) None¶
Handle form submission
- on_cancel(button: urwid.Button) None¶
Handle form cancellation
- run() dict | None¶
Run the form and return credentials
- _handle_escape() bool¶
Clear the current edit field or focus the Cancel button.
- tcurl_login.get_credentials(defaults: dict[str, str] | None = None) dict[str, str] | None¶
Show credential form and return results
Returns: Dictionary with ‘username’, ‘password’, ‘domain’, ‘otp’ keys, or None if cancelled
- tcurl_login.parser_factory(color: bool = False) argparse.ArgumentParser¶
Create and configure the command-line argument parser.
- Returns:
Configured argument parser
- tcurl_login.main()¶