+
    Z8i                        R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^RIHtH	t	H
t
HtHtHtHtHtHt ^RIHt  ! R R4      tR	R lt]R8X  d   ]P,                  ! ]! 4       4       R# R# )
z@Simple command line interface to get/set password from a keyring)annotationsN)	backend
completioncorecredentialsdelete_passwordget_credentialget_passwordset_keyringset_password)	platform_c                      ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R]R&   R]R&   R]R	&   R
 tR tR tR tR R lt	R R lt
R R ltR R ltR tR tR tR tR tR t]R 4       t]R 4       tRtR# ) CommandLineToolz
str | Nonekeyring_pathkeyring_backendstrget_modeoutput_format	operationserviceusernamec                	   \         P                  ! 4       V n        V P                  P                  R RRRRR7       V P                  P                  RRRRR	R7       V P                  P                  R
RRR7       V P                  P                  RRRR7       RR.V P                  n        V P                  P                  RV P                  P                  RRRR7       RR.V P                  n        V P                  P                  RV P                  P
                  RRRR7       . R!OV P                  n        V P                  P                  RV P                  P                  RR7       V P                  P                  RRR7       V P                  P                  R RR7       \        P                  ! V P                  4       R# )"z-pz--keyring-pathr   NzPath to the keyring backend)destdefaulthelpz-bz--keyring-backendr   zName of the keyring backendz--list-backends
store_truezList keyring backends and exit)actionr   z	--disablezDisable keyring and exitpasswordcredsz--moder   a  
            Mode for 'get' operation.
            'password' requires a username and will return only the password.
            'creds' does not require a username and will return both the username and password separated by a newline.

            Default is 'password'
            )choicesr   r   r   plainjsonz--outputr   z\
            Output format for 'get' operation.

            Default is 'plain'
            r   ?)r   nargsr   )r#   r   )getsetdeldiagnose)	argparseArgumentParserparseradd_argument
_get_modes_output_formats_operationsr   installselfs   &+lib/python3.14/site-packages/keyring/cli.py__init__CommandLineTool.__init__"   s   --/  . 	! 	
 	  ". 	! 	
 	  1 	! 	

 	  3M 	! 	
 #-g!6  KK** 	! 	
 (/&7#  KK//  	! 
	
 #D  KK++ 	! 	

 	   	! 	
 	   	! 	
 	4;;'    c                	"   V P                   P                  V4      p\        V 4      P                  \        V4      4       VP                  '       d*   \
        P                  ! 4        F  p\        V4       K  	  R # VP                  '       d   \        P                  ! 4        R # VP                  R8X  d   V P                  4        R # V P                  4        V P                  4        \        V RV P                   2V P                  4      pV! 4       # )Nr'   do_)r*   
parse_argsvarsupdatelist_backendsr   get_all_keyringprintdisabler   r   r'   _check_args_load_spec_backendgetattr
invalid_op)r1   argvargskmethods   &&   r2   runCommandLineTool.rund   s    {{%%d+T
$t*%,,.a /<<<LLN>>Z'MMO!T^^$45tGxr5   c                	  a  S P                   R 8g  ;'       g    S P                  R8g  pR.R.V,          ,           \        S P                   4      ,          p\        ;QJ d    V 3R lV 4       F  '       g   K   RM	  RM! V 3R lV 4       4      '       d<   S P                  P                  S P                    RRP                  V4       24       R	# R	# )
r$   r   r   r   c              3  @   <"   T F  p\        SV4      R J x  K  	  R # 5iN)rA   ).0paramr1   s   & r2   	<genexpr>.CommandLineTool._check_args.<locals>.<genexpr>}   s     BwtU#t+s   TFz
 requires z and N)r   r   boolanyr*   errorjoin)r1   needs_usernamerequireds   f  r2   r?   CommandLineTool._check_argsz   s    50LLDMMW4LK:,"??4CWW3BB333BBBBKK 0
7<<;Q:RST Cr5   c                	    \        V R V P                   24      ! 4       pVf   \        ^4      h\        V RV P                   24      ! V4       R# )_get_N_emit_)rA   r   
SystemExitr   r1   
credentials   & r2   do_getCommandLineTool.do_get   sI    TU4==/#:;=
Q-t11234Z@r5   c                   V ^8  d   QhRR/#    r\   zcredentials.Credential )formats   "r2   __annotate__CommandLineTool.__annotate__   s     . .%; .r5   c                	`    \        \        P                  ! VP                  4       4      4       R # rK   )r=   r!   dumps_varsr[   s   &&r2   
_emit_jsonCommandLineTool._emit_json   s    djj))+,-r5   c                   V ^8  d   QhRR/# r`   rb   )rc   s   "r2   rd   re      s      &< r5   c                	f    VP                  4       P                  4        F  p\        V4       K  	  R # rK   )rh   valuesr=   )r1   r\   vals   && r2   _emit_plainCommandLineTool._emit_plain   s%    ##%,,.C#J /r5   c                   V ^8  d   QhRR/# ra   returnzcredentials.Credential | Nonerb   )rc   s   "r2   rd   re      s     ; ;9 ;r5   c                	B    \        V P                  V P                  4      # rK   )r   r   r   r0   s   &r2   
_get_credsCommandLineTool._get_creds   s    dllDMM::r5   c                   V ^8  d   QhRR/# rr   rb   )rc   s   "r2   rd   re      s     
 
< 
r5   c                	z    \        V P                  V P                  4      pVe   \        P                  ! V4      # R # rK   )r	   r   r   r   AnonymousCredentialr1   r   s   & r2   _get_passwordCommandLineTool._get_password   s6    dmm<9A9MK++H5	
SW	
r5   c                	    V P                  R V P                   RV P                   R24      p\        V P                  V P                  V4       R# )zPassword for 'z' in 'z': N)input_passwordr   r   r   rz   s   & r2   do_setCommandLineTool.do_set   sB    &&T]]O6$,,sC
 	T\\4==(;r5   c                	F    \        V P                  V P                  4       R # rK   )r   r   r   r0   s   &r2   do_delCommandLineTool.do_del   s    dmm4r5   c                	    \         P                  ! 4       pVP                  4       '       d   \        R V4       M\        R VR4       \        R\        P
                  ! 4       4       R# )zconfig path:z(absent)z
data root:N)r   _config_pathexistsr=   r   	data_root)r1   config_roots   & r2   r'   CommandLineTool.diagnose   sH    '').+..+z:lI//12r5   c                	    V P                   P                  R RP                  V P                   P                  4       R24       R# )zSpecify operation (z, z).N)r*   rR   rS   r.   r0   s   &r2   rB   CommandLineTool.invalid_op   s3    /		$++:Q:Q0R/SSUVWr5   c                	`   V P                   f   R #  V P                  '       d+   \        P                  P	                  ^ V P                  4       \        \        P                  ! V P                   4      4       R #   \         d*   pT P                  P                  RT 24        R p?R # R p?ii ; i)Nz"Unable to load specified keyring: )r   r   syspathinsertr
   r   load_keyring	Exceptionr*   rR   )r1   excs   & r2   r@   "CommandLineTool._load_spec_backend   s    '
	J   4#4#45))$*>*>?@ 	J KK B3%HII	Js   A9 AA9 9B-B((B-c                ^    V P                  4       ;'       g    \        P                  ! V4      # )zRetrieve password from input.)pass_from_pipegetpass)r1   prompts   &&r2   r~   CommandLineTool.input_password   s"    ""$??(??r5   c                    \         P                  P                  4       '       * pT;'       d.    V P                  \         P                  P	                  4       4      # )z4Return password from pipe if not on TTY, else False.)r   stdinisattystrip_last_newlineread)clsis_pipes   & r2   r   CommandLineTool.pass_from_pipe   s=     ii&&((CC311#))..2BCCr5   c                Z    \        V P                  R4      '       d   RMR4      pW,          # )zStrip one last newline, if present.

>>> CommandLineTool.strip_last_newline('foo')
'foo'
>>> CommandLineTool.strip_last_newline('foo\n')
'foo'

N)sliceendswith)r   slcs   & r2   r   "CommandLineTool.strip_last_newline   s%     #,,t,,B$7xr5   )r*   N)__name__
__module____qualname____firstlineno____annotations__r3   rG   r?   r]   ri   ro   ru   r{   r   r   r'   rB   r@   r~   classmethodr   staticmethodr   __static_attributes__rb   r5   r2   r   r      s    MNLM@(D,UA.;
<53XJ @ D D
 	 	r5   r   c                n    V f   \         P                  R,          p \        4       pVP                  V 4      # )zMain command line interface.:   NN)r   rC   r   rG   )rC   clis   & r2   mainr      s,     |xx|

C774=r5   __main__rK   )__doc__
__future__r   r(   r   r!   r    r   r   r   r   r   r   r	   r
   r   utilr   r   r   r   exitrb   r5   r2   <module>r      sZ    F "    

 
 
 v vr zHHTV r5   