Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
cli.cpython-313.pyc100 linesDownload Raw Back to __pycache__
1�

2s�j����SSKrSSKrSSKrSSKrSSKJr SSKJrJrJ	r	J3r4JrJr \RS:XaSSKJr SSKrSSKJrJrJr SS	KJr S5\\4Sjr\R:"5\R<"SS
\"5\R>"SS9SS9\R<"SSS\R@"/SQ5SS9\R<"SSS\RBSS9\RD"\S9\RFS\RHS\S\S\S6S47S j555555r%\S!\RLS8\9\\4S"j5r'\%RQS#S$9\RF\R<"S%S&S'\R@"/S(Q5S)S9S\RHS&\S10S4S*j555r)\%RQS+S$9\RF\RT"S,SS-9\RT"S.SS-9S\RHS,\S.\S11S4S/j5555r+\%RQ5\RF\RT"S,SS-9S\RHS,\S12S4S0j555r,\%RQ5\RF\RT"S,SS-9S\RHS,\S13S4S1j555r-\%RQSSSS2.S39\RF\R<"S4SS5S69\RT"S7S8\R\S99S\RHS:\/S7\0\S;4S14S4S<j5555r1S=\\S>\	\\4S15S4S?jr2g!\a1 \R$R'S5 \R("S5 GNf=f)@�N)�contextmanager)�IO�Any�Dict�Iterator�List�Optional�win32)�PopenzkIt seems python-dotenv is not installed with cli option. 16Run pip install "python-dotenv[cli]" to fix this.�)�
dotenv_values�set_key�	unset_key)�__version__�returnc��[R"5n[RR	US5nU$![a gf=f)zN17Return a path for the ${pwd}/.env file.18 19If pwd does not exist, return None.20Nz.env)�os�getcwd�FileNotFoundError�path�join)�cwdrs  �PD:\code\apps\devtools\python\user_packages\Python313\site-packages\dotenv/cli.py�
enumerate_envrsA����i�i�k���7�7�<�<��V�$�D��K������s�9�21A�Az-fz--fileT)�	file_okayzNLocation of the .env file, defaults to .env file in current working directory.)�default�type�helpz-qz--quote�always)r�never�autozbWhether to quote or not the variable values. Default mode is always. This does not affect parsing.z-ez--exportFz;Whether to write the dot file as an executable bash script.)�version�ctx�file�quote�exportc��X#US.Ulg)zAThis script is used to set, get or unset values from a .env file.)�QUOTE�EXPORT�FILEN)�obj)r#r$r%r&s    r�clir,&s��4��>�C�G�rc#��# �[U5nUv� SSS5 g!,(df   g=f![a;n[SU3[RS9 [R22"S5 SnAgSnAff=f7f)zr23Open a file and yield the corresponding (decoded) stream.24 25Exits with error code 2 if the file cannot be opened.26NzError opening env file: )r$�)�open�OSError�print�sys�stderr�exit)r�stream�excs   r�stream_filer8CsS����
�$�Z�6��L��Z�Z����
�(���.�S�Z�Z�@���������sC�A6�.��.�A6�27+�.�A6�.�28A3�1A.�)A6�.A3�3A6�list)�namez--format�
output_format�simple)r<�json�shellr&zlThe format in which to display the list. Default format is simple, which displays name=value without quotes.c��URSn[U5n[US9nSSS5 US:Xa+[R"[29R"WSSS95 gUS:XaS	OS30n[W5HEnXFnUcMUS;a[R"U5n[R"UUSU35 MG g!,(df   N�=f)
z!Display all the stored key/value.r*�r6Nr=r/T)�indent�	sort_keysr&zexport �)r&r>�=)31r+r8r
�click�echor=�dumps�sorted�shlexr%)r#r;r$r6�values�prefix�k�vs        r�list_valuesrNSs����7�7�6�?�D�	�T�	�f��f�-��32����
�33�34�4�:�:�f�Q�$�?�@�+�x�7��R�����A��	�A��}� �$7�7����A��A��35�36�f�X�a�S��!��-�.� �37�	�s�38B=�=39C�set�key)�required�valuec���URSnURSnURSn[X1X$U5upanU(a[R"USU35 g[R40"S5 g)z�41Store the given key/value.42 43This doesn't follow symlinks, to avoid accidentally modifying a file at a44potentially untrusted path.45r*r(r)rDrN)r+rrErFr3r5)r#rPrRr$r%r&�successs       r�	set_valuerUpse���7�7�6�?�D��G�G�G��E�
�W�W�X�
�F�!�$�U�6�B��G�%��
�46�47�c�U�!�E�7�#�$�����r-c��URSn[U5n[US9nSSS5 WRU5nU(a[R48"U5 g[R"S5 g!,(df   NT=f)z%Retrieve the value for the given key.r*r@Nr)r+r8r
�getrErFr3r5)r#rPr$r6rJ�stored_values      rrWrW�s\��49�7�7�6�?�D�	�T�	�f��f�-��50��:�:�c�?�L��
�51�52�<� ������53�	�s�54A3�355Bc���URSnURSn[X!U5upAU(a[R"SU35 g[R56"S5 g)z57Removes the given key.58 59This doesn't follow symlinks, to avoid accidentally modifying a file at a60potentially untrusted path.61r*r(zSuccessfully removed rN)r+rrErFr3r5)r#rPr$r%rTs     r�unsetrZ�sO���7�7�6�?�D��G�G�G��E��T��.�L�G��
�62�63�*�3�%�0�1�����r-)�allow_extra_args�allow_interspersed_args�ignore_unknown_options)�context_settingsz--override/--no-overridezKOverride variables from the environment file with those from the .env file.)rr�commandline�����)�nargsr�override.c���URSn[RRU5(d[R64"SUS3US9e[
U5R5VVs0sH)upEUcM65U(dU[R;dM'XE_M+ nnnU(d,[R"S5 [R"S5 [/UQURQU5 gs snnf)z/Run command with environment variables present.r*zInvalid value for '-f' "z" does not exist.)r#NzNo command given.r)r+rr�isfilerE�BadParameterr
�items�environrFr3r5�run_command�args)r#rbr_r$rLrM�dotenv_as_dicts       r�runrk�s��� �7�7�6�?�D�
�7�7�>�>�$���� � �'��v�-?�@�c�66�	67�68$�D�)�/�/�1��1�F�Q��	
�&�!�2�:�:�*=�	
���1����
�69�70�&�'�������)�+�)����)�>�:��s�)	C*�6C*�C*�command�envc�<�[RR5nURU5 [R71S:XaA[
USSSUS9nUR5u n[R"UR5 g[R"USXS9 g)a�Replace the current process with the specified command.72 73Replaces the current process with the specified command and the variables from `env`74added in the current environment variables.75 76Parameters77----------78command: List[str]79    The command and it's parameters80env: Dict81    The additional environment variables82 83Returns84-------85None86    This function does not return any value. It replaces the current process with the new one.87 88r89TrF)�universal_newlines�bufsizer>rm)rirmN)rrg�copy�updater3�platformr�communicater5�90returncode�execvpe)rlrm�cmd_env�p�_s     rrhrh�sr��*�j�j�o�o��G��N�N�3��91�|�|�w��
�'�d�A�U�PW�X���}�}����1��������92�93�94�7�1�:�G�9r-)3r=rrIr3�95contextlibr�typingrrrrrr	rs�96subprocessrrE�ImportErrorr4�writer5�mainr
rrr"r�strr�group�option�Path�Choice�BOOL�version_option�pass_context�Contextr,�PathLiker8rlrN�argumentrUrWrZ�UNPROCESSED�bool�tuplerkrh�r-r�<module>r�s����	��97�%�:�:��<�<�7�� ���4�3� ��x��}������������O�	���d�	#�	Y������
��	���1�	2�	m��������	���	F�����k�*����?�U�]�]�?�#�?�c�?�3�?�4�?��+�����0?�98��b�k�k��h�r�#�w�&7�������&������������	���;�	<�990��/�U�]�]�/�3�/�4�/����/�&���%�����������%�����$�'��5�=�=��s��3��4��(�&����$������������%��U�]�]������&����������������%�
�u�}�}�
�3�
�4�
�&���
� ��� �#(�"&��
����������	V��100���
�R�e�.?�.?�@�;�U�]�]�;�d�;��s�C�x��;�T�;�A����;�( :��c�� :��c�3�h�� :�D� :�����J�J���	<���H�H�Q�K��s�L�3M�M
codekingpro/portable-devtools · Team Ai