Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2��j@���v�SSKJr SSKrSSKJr SSKrSSKrSSK	r	SSK3r4SSKrSSKrSSK
r
SSKrSSKJr SSKJr SSKJr SSKrSSKJr SSKJr SSKJr SS	KJr S5SKJ r  S6SK!J"r" S7S
K!J#r# \RH(aSSK%r%SSK&J'r' SSK&J(r( SSK&J)r) S8SK*J+r+ "SS\RX5r-SxSjr.SySjr/SzSjr0S{Sjr1\RdS|S}Sjj5r3\RdS~SSjj5r3S|S�Sjjr3S�Sjr4\Rj"S/SS \4SSS!9r6"S"S#5r7\Rp"\7SS$9r9\Rt"S%\RvS\Rx4S&9r=S�S'jr>"S(S)\R~5r@S�S*jrA\Rj"S+S,/S-S.SS \AS/9rBS�S0jrC\Rj"S1/S2S \CS39rDS�S4jrE\Rj"S5S6/\R�"SS S79S8SS \ES99rG"S:S;\@5rHS�S<jrIS�S�S=jjrJS�S>jrK"S?S@\R�5rMS�SAjrN"SBSC\R�5rO\R�"SDSESF9\R�"SGSHSISJSK9\R�"SLSMSNSOSK9\R�"SP\M"5SQSSR9\R�"SS\R�"SS SST9\NS SUSV9\R�"SWSSXSK9\R�"SYSSZSK9\R�"S[SS\SK9\R�"S]S\O"5S^\	R�R�<S_3S`9\R�"SaS\O"5Sb\	R�R�<S_3S`9\9S�Scj55555555555rT\TR�R�S\D5 \R�"SdSeSF9\>S�Sfj55rW\R�"SgShSF9\R�"SiSj\R�"Sk5SlSmSn9\R�"SoSSpSq9\>S�Srj5555rY\H"SsStSu9rZS�Svjr[\\Sw:Xa\["5 gg)��)�annotationsN)�update_wrapper)�9itemgetter)�10ModuleType)�ParameterSource)�11run_simple)�is_running_from_reloader)�
import_string�)�current_app)�get_debug_flag)�get_load_dotenv)�
StartResponse)�WSGIApplication)�WSGIEnvironment��Flaskc��\rSrSrSrSrg)�NoAppException�%z3Raised if an application cannot be found or loaded.�N)�__name__�12__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r��OD:\code\apps\devtools\python\user_packages\Python313\site-packages\flask/cli.pyrr%s��=rrc
���SSKJn SH#n[XS5n[X15(dM!Us $ URR5Vs/sHn[XA5(dMUPM nn[
U5S:XaUS$[
U5S:�a&[SURSURS35eS	HHn[XS5n[R"U5(dM,U"5n[X15(aUs $MJ [SURSURS35es snf![aCn[U5(de[S13USURSURS
US3	5UeSnAff=f)zoGiven a module instance this tries to find the best possible14application in the module or raises an exception.15rr)�app�applicationNrz0Detected multiple Flask applications in module 'z'. Use 'z":name' to specify the correct one.)�16create_app�make_appzDetected factory 'z
' in module 'z1', but could not call it without arguments. Use '�:z(args)' to specify arguments.z7Failed to find Flask application or factory in module 'z:name' to specify one.)
�r�getattr�17isinstance�__dict__�values�lenrr�inspect�18isfunction�	TypeError�_called_with_wrong_args)�moduler�	attr_namer!�v�matches�app_factory�es        r�
find_best_appr6)s����,�	��f��.���c�!�!��J�	,�!�/�/�0�0�2�K�2�Q�j��6J�q�2�G�K�19�7�|�q���q�z��	�W���	��
����!��&�/�/�):�;+�
+�20�	21�0�	��f��6�����k�*�*�
�!�m���c�)�)��J�*�0�(�	
�
�_�_��X�f�o�o�%6�7�	����AL��*�	
�.�{�;�;��$�(���=����@Q�R����)��9�+�6-�-��22���		
�s$�D)�$D)�$D.�.23E;�8>E6�6E;c��[R"5SnUb7URRURLaAgUR24nUbM7Ag!Af=f)z�Check whether calling a function raised a ``TypeError`` because25the call failed or because something in the factory raised the26error.27 28:param f: The function that was called.29:return: ``True`` if the call failed.30�FT)�sys�exc_info�tb_frame�f_code�__code__�tb_next)�f�tbs  rr/r/^s\��31
�����	�B�
��n��{�{�!�!�Q�Z�Z�/��
����B��n��
��B�s�&A�A�Ac��SSKJn [R"UR	5SS9R32n[U[R5(aURn/n0nGO[U[R5(a�[UR[R5(d[SU<S	35eURRnURVs/sHn[R"U5PM nnURVs0sH=nUR cMUR [R"UR"5_M? nnO[SU<S35e['X5n	[,R."U	5(a33U	"U0UD6nOU	n[X�5(aU$[SUR*SUS35e![a [SU<S35Sef=fs snfs snf![$a [S34U<S	35Sef=f![(a$n35[SU<SUR*<S	35U36eSn37A38ff=f![0a5n39[3U	5(de[S
U<SUR*<S35U40eSn41A42ff=f)z�Check if the given string is a variable name or a function. Call43a function to get the app instance, or return the variable directly.44rr�eval)�modezFailed to parse z' as an attribute name or function call.Nz*Function reference must be a simple name: �.z-Failed to parse arguments as literal values: zFailed to find attribute z in zThe factory z in module z2 could not be called with the specified arguments.z1A valid Flask application was not obtained from 'r%z'.)r&r�ast�parse�strip�body�SyntaxErrorrr(�Name�id�Call�func�args�literal_eval�keywords�arg�value�45ValueErrorr'�AttributeErrorrr,r-r.r/)r0�app_namer�expr�namerN�kwargsrQ�kw�attrr5r!s            r�find_app_by_stringr[xs������y�y����)��7�<�<���$����!�!��w�w������	�D�#�(�(�	#�	#��$�)�)�S�X�X�.�.� �<�X�L��J��
��y�y�|�|��	�59�Y�Y�?�Y�c�C�$�$�S�)�Y�D�?��-�-��'�B��6�6�3�����(�(����2�2�'�
��F���x�l�*Q�R�46�	47���v�$�����$���48	���'��'�C����#����49�50�	
�
�_�_��Q�x�j��	,����A����x�l�*Q�R�51��	���(@����52�	�!�?��|�1�M���
�	�����'��x�t�F�O�O�3F�a�H�53��	�����	�*�4�0�0�� ��x�l�+��O�O�&�'(�(���	
��		�sk�-G�G4�# G*�G4�G/�(/G/�G4�+H�I�G'�*54G4�4H�55I�H<�<I�56J�0I>�>Jc��[RRU5n[RRU5upUS:XaUn[RR	U5S:Xa[RRU5n/n[RR
U5upURU5 [RR[RRUS55(dOMw[RSU:wa [RRSU5 SRUSSS25$)z�Given a filename this will try to calculate the python path, add it57to the search path and return the actual module name that is expected.58z.py�__init__z__init__.pyrrDN�����)�os�path�realpath�splitext�basename�dirname�split�append�exists�joinr9�insert)r`�fname�ext�module_namerWs     r�prepare_importrm�s����7�7���D�!�D����!�!�$�'�J�E�59�e�|���	�w�w������+��w�w���t�$���K���W�W�]�]�4�(�60�����4� ��w�w�~�~�b�g�g�l�l�4��?�@�@����x�x��{�d��������4� ��8�8�K��"��%�&�&rTc��g�Nr�rlrU�raise_if_not_founds   r�61locate_apprr�s��
r.c��grorrps   rrrrr�s��rc�\�[U5 [RUnUc[U5$[X15$![ah [R"5SR(a&[SU<S[R"535SeU(a[SU<S35Segf=f)Nr8zWhile importing z, an ImportError was raised:62 63zCould not import rD)�64__import__�ImportErrorr9r:r>r�	traceback�65format_exc�modulesr6r[)rlrUrqr0s    rrrrr�s���
��;���[�[��
%�F����V�$�$�!�&�3�3��%���<�<�>�!��$�$� �"�;�/�2�(�3�3�5�6�8���
� � �#4�[�O�1�!E�F�D�P���s�9�A/B+�*B+c�H�U(aUR(ag[RRS5n[RRS5n[R66"S[R"5SUSU3URS9 UR5 g)N�flask�werkzeug�Python z67Flask z68 69Werkzeug )�color)70�resilient_parsing�	importlib�metadata�version�click�echo�platform�python_versionr~�exit)�ctx�paramrR�
flask_version�werkzeug_versions     r�get_versionr�s����C�)�)���&�&�.�.�w�7�M� �)�)�1�1�*�=��	�J�J�71�(�)�)�+�,�-��� �$�%�	'��i�i�	��H�H�Jrz	--versionzShow the Flask version.F)�help�expose_value�callback�is_flag�is_eagerc�J�\rSrSrSrSSSjjrS	SjrSrg)72�73ScriptInfoi%a�Helper object to deal with Flask applications.  This is usually not74necessary to interface with as it's used internally in the dispatching75to click.  In future versions of Flask this object will most likely play76a bigger role.  Typically it's created automatically by the77:class:`FlaskGroup` but you can also manually create it and pass it78onwards as click object.79 80.. versionchanged:: 3.181    Added the ``load_dotenv_defaults`` parameter and attribute.82Nc�f�XlX l0UlX0l[	U5UlSUlgro)�app_import_pathr#�data�set_debug_flagr�load_dotenv_defaults�_loaded_app)�selfr�r#r�r�s     rr]�ScriptInfo.__init__1s=�� /��%��)+��	�,��$3�4H�$I��!�	�*.��rc���URbUR$SnURbUR5nOuUR(a@[R"SURSS9S/-SSup#[U5n[
XC5nO$SHn[U5n[
USSS9nUcM O Uc[S	5eUR(a[5Ul83XlU$)84z�Loads the Flask app (if not yet loaded) and returns it.  Calling85this multiple times will just result in the already loaded app to86be returned.87Nz88:(?![\\/])r)�maxsplitr8)zwsgi.pyzapp.pyF)rqz�Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory.)r�r#r��rerermrrrr�r
�debug)r�r!r`rW�import_names     r�load_app�ScriptInfo.load_appMs���89���'��#�#�#� ���?�?�&��/�/�#�C��#�#��H�H�]�D�,@�,@�1�M�QU�PV�V��1��90��-�T�2�� ��3��1�D�"0��"6�K�$�[�$�5�Q�C����2��;� �&��
����'�(�C�I����91r)r�r�r#r�r�r�)NNTT)92r��93str | Noner#�t.Callable[..., Flask] | Noner��boolr�r��return�None)r�r)rrrrrr]r�rrrrr�r�%sO��	�'+�48�#�%)�.�#�.�2�.��	.�94#�.�95�
.�8'rr�)�ensure�F)�boundc�R^�[RSU4Sjj5n[UT5$)a�Wraps a callback so that it's guaranteed to be executed with the96script's application context.97 98Custom commands (and their options) registered under ``app.cli`` or99``blueprint.cli`` will always have an app context available, this100decorator is not required in that case.101 102.. versionchanged:: 2.2103    The app context is active for subcommands as well as the104    decorated callback. The app context is always available to105    ``app.cli`` command and parameter callbacks.106c��>�[(dBUR[5R5nUR	UR55 UR"T/UQ70UD6$ro)r�
ensure_objectr�r��
with_resource�app_context�invoke)r�rNrXr!r?s    �r�	decorator�"with_appcontext.<locals>.decorator�sO����{��#�#�J�/�8�8�:�C����c�o�o�/�0��z�z�!�-�d�-�f�-�-r)r��
click.ContextrN�t.AnyrXr�r�r�)r��pass_contextr)r?r�s` r�with_appcontextr�|s,������.��.��)�Q�'�'rc�X^�\rSrSrSrSU4SjjrSU4SjjrSrU=r$)�AppGroupi�z�This works similar to a regular click :class:`~click.Group` but it107changes the behavior of the :meth:`command` decorator so that it108automatically wraps the functions in :func:`with_appcontext`.109 110Not to be confused with :class:`FlaskGroup`.111c�L>^^^^�TRSS5mSUUUUU4SjjnU$)z�This works exactly like the method of the same name on a regular112:class:`click.Group` but it wraps callbacks in :func:`with_appcontext`113unless it's disabled by passing ``with_appcontext=False``.114r�Tc�\>�T(a[U5n[[T]"T0TD6"U5$ro)r��superr��command)r?�	__class__rNrXr��wrap_for_ctxs �����rr��#AppGroup.command.<locals>.decorator�s,����#�A�&����4�0�$�A�&�A�!�D�Dr)r?zt.Callable[..., t.Any]r�z
click.Command)�pop)r�rNrXr�r�r�s``` @�rr��AppGroup.command�s*����z�z�"3�T�:��	E�	E�115�rc�P>�URS[5 [TU]"U0UD6$)z�This works exactly like the method of the same name on a regular116:class:`click.Group` but it defaults the group class to117:class:`AppGroup`.118�cls)�119setdefaultr�r��group)r�rNrXr�s   �rr��AppGroup.group�s)���	���%��*��w�}�d�-�f�-�-rr)rNr�rXr�r�z3t.Callable[[t.Callable[..., t.Any]], click.Command])rNr�rXr�r�z1t.Callable[[t.Callable[..., t.Any]], click.Group])	rrrrrr�r�r�
__classcell__�r�s@rr�r��sG�������&+��	<�� .��.�&+�.�	:�.�.rr�c�D�UcgUR[5nX#lU$ro)r�r�r�)r�r�rR�infos    r�_set_appr��s%���}�����Z�(�D� ���Lrz-Az--app�IMPORTz�The Flask application or factory function to load, in the form 'module:name'. Module can be a dotted import or file path. Name is not required if it is 'app', 'application', 'create_app', or 'make_app', and can be 'name(args)' to pass arguments.)�metavarr�r�r�r�c���URUR5nUb%U[R[R4;agU(aSOS[120RS'U$)N�1�0�FLASK_DEBUG)�get_parameter_sourcerWr�DEFAULT�DEFAULT_MAPr_�environ)r�r�rR�sources    r�121_set_debugr��sZ���
%�
%�e�j�j�
1�F�
��f�����#�#�)���(-��#�B�J�J�}���Lrz--debug/--no-debugzSet debug mode.)r�r�r�c���SSKnUcURR122(a[
X RR123S9 U$![a Ub[R"SUUS9SeNcf=f)Nrz4python-dotenv must be installed to load an env file.)r�r�)�
load_defaults)�dotenvrvr��BadParameter�objr��load_dotenv)r�r�rRr�s    r�_env_file_callbackr��st��124��
��C�G�G�8�8��E���)E�)E�F��L�������$�$�F�����	
���s�A�$A*�)A*z-ez125--env-file)rg�dir_okayz�Load environment variables from this file, taking precedence over those set by '.env' and '.flaskenv'. Variables set directly in the environment take highest precedence. python-dotenv must be installed.)�typer�r�r�r�c�^�\rSrSrSrS126SU4SjjjrSSjrS
U4SjjrSU4SjjrSSU4Sjjjr	SU4Sjjr127S	rU=r$)�128FlaskGroupiaASpecial subclass of the :class:`AppGroup` group that supports129loading more commands from the configured Flask app.  Normally a130developer does not have to interface with this class but there are131some very advanced use cases for which it makes sense to create an132instance of this. see :ref:`custom-scripts`.133 134:param add_default_commands: if this is True then the default run and135    shell commands will be added.136:param add_version_option: adds the ``--version`` option.137:param create_app: an optional callback that is passed the script info and138    returns the loaded app.139:param load_dotenv: Load the nearest :file:`.env` and :file:`.flaskenv`140    files to set environment variables. Will also change the working141    directory to the directory containing the first file found.142:param set_debug_flag: Set the app's debug flag.143 144.. versionchanged:: 3.1145    ``-e path`` takes precedence over default ``.env`` and ``.flaskenv`` files.146 147.. versionchanged:: 2.2148    Added the ``-A/--app``, ``--debug/--no-debug``, ``-e/--env-file`` options.149 150.. versionchanged:: 2.2151    An app context is pushed when running ``app.cli`` commands, so152    ``@with_appcontext`` is no longer required for those commands.153 154.. versionchanged:: 1.0155    If installed, python-dotenv will be used to load environment variables156    from :file:`.env` and :file:`.flaskenv` files.157c��>�[URSS5=(d S5nUR[[[15845 U(aUR
[5 SU;a0US'USRSS5 [TU]("SSU0UD6 X lX@lXPl
U(a?UR[5 UR[ 5 UR["5 SUlg)N�paramsr�context_settings�auto_envvar_prefix�FLASKF)�listr��extend�_env_file_option�_app_option�
_debug_optionrf�version_optionr�r�r]r#r�r��add_command�run_command�
shell_command�routes_command�_loaded_plugin_commands)	r��add_default_commandsr#�add_version_optionr�r��extrar�r�s	        �rr]�FlaskGroup.__init__3s����)-�U�Y�Y�x��-F�-L�"�(M��159	�
�
�'��m�D�E���M�M�.�)��U�*�(*�E�$�%�
� �!�,�,�-A�7�K�
���0��0�%�0�$��&��,������[�)����]�+����^�,�',��$rc���UR(ag[RS:�aSSKJn OSSKnUR
SS9H-nURUR5UR5 M/ SUlg)N)��160r)r�zflask.commands)r�T)161r�r9�version_infor�r��importlib_metadata�entry_pointsr��loadrW)r�r��eps   r�_load_plugin_commands� FlaskGroup._load_plugin_commandsXsb���'�'�����w�&�*�162
2��'�'�.>�'�?�B����R�W�W�Y����0�@�(,��$rc��>�UR5 [TU]	X5nUbU$UR[5nUR5n[(a[R"5ULaURUR55 URRX5$![a2n[R"SUR5S3SSS9 SnAgSnAff=f�NzError: �163T�red)�err�fg)r�r��get_commandr�r�r�rr��secho�format_messager�_get_current_objectr�r��cli)r�r�rW�rvr�r!r5r�s       �rr�FlaskGroup.get_commandis�����"�"�$��W�
 ��
+��
�>��I�� � ��,��	��-�-�/�C��{�k�=�=�?�s�J����c�o�o�/�0��w�w�"�"�3�-�-���	��K�K�'�!�"2�"2�"4�!5�R�8�d�u�M���	�s�B)�)164C%�3(C � C%c��>�UR5 [[TU]
U55nUR	[1655nUR
UR5RRU55 [!U5$![a2n[R"SUR5S3SSS9 SnANBSnAf[a/ [R"[R"5S3SSS9 N}f=fr)r��setr��
list_commandsr�r��updater�rrr�rr	�	Exceptionrwrx�sorted)r�r�rr�r5r�s     �rr�FlaskGroup.list_commands�s�����"�"�$�
���&�s�+�
,��� � ��,��		K��I�I�d�m�m�o�)�)�7�7��<�=��b�z����	N�
�K�K�'�!�"2�"2�"4�!5�R�8�d�u�M���	K�
�K�K�9�/�/�1�2�"�5�4�E�J�	K�s�8B�166C6�
(B:�:9C6�5C6c��>�S[RS'SU;a<SUR;a,[URUR167URS9US'[TU] "X4SU0UD6$)N�true�FLASK_RUN_FROM_CLIr�)r#r�r��parent)	r_r�r�r�r#r�r�r��make_context)r��	info_namerNrr�r�s     �rr�FlaskGroup.make_context�sl���,2��168�169�'�(����%�t�/D�/D�"D�%��?�?�#�2�2�%)�%5�%5��E�%�L��w�#�I�L�F�L�e�L�Lrc��>�U(dUR(d'[U5S:XaFUSURU5;a.[R	U0/5 [170R	U0/5 [TU]X5$)Nrr)�no_args_is_helpr+�get_help_option_namesr��handle_parse_resultr�r��171parse_args)r�r�rNr�s   �rr �FlaskGroup.parse_args�se�����-�-���I��N�t�A�w�$�*D�*D�S�*I�I�172
�0�0��b�"�=��+�+�C��R�8��w�!�#�,�,r)r�r#r�r�)TNTTT)r�r�r#r�r�r�r�r�r�r�r�r�r�r��r�r�)r�r�rW�strr�zclick.Command | None)r�r�r��	list[str]ro)173rr�rNr$r�click.Context | Noner�r�r�r�)r�r�rNr$r�r$)
rrrrrr]r�rrrr rr�r�s@rr�r�s�����B&*�48�#'� �#�
#-�"�#-�2�#-�!�	#-�174�#-��
#-��#-�175�#-�#-�J,�".�6�2(,�	M��M��M�%�	M�176�M�177�
M�M�*178-�179-rr�c��[RRX[U5SR	[R18055U:H$)z�Take ``other`` and remove the length of ``path`` from it. Then join it181to ``path``. If it is the original value, ``path`` is an ancestor of182``other``.N)r_r`rhr+�lstrip�sep)r`�others  r�_path_is_ancestorr*�s6���7�7�<�<��C��I�K�0�7�7����?�@�E�I�Irc��SSKn0nU(a4S183H.nURUSS9=n(dMX2RUSS
9-nM0 Ub6[RR	U5(aX2RUSS
9-nUR5H1upgU[R;dUcMU[RU'M3 [U5$![ah U(dH[RR	S5(d$[RR	S5(a[184R"SSSS9 g	f=f)aLoad "dotenv" files to set environment variables. A given path takes185precedence over ``.env``, which takes precedence over ``.flaskenv``. After186loading and combining these files, values are only set if the key is not187already set in ``os.environ``.188 189This is a no-op if `python-dotenv`_ is not installed.190 191.. _python-dotenv: https://github.com/theskumar/python-dotenv#readme192 193:param path: Load the file at this location.194:param load_defaults: Search for and load the default ``.flaskenv`` and195    ``.env`` files.196:return: ``True`` if at least one env var was loaded.197 198.. versionchanged:: 3.1199    Added the ``load_defaults`` parameter. A given path takes precedence200    over default files.201 202.. versionchanged:: 2.0203    The current directory is not changed to the location of the204    loaded file.205 206.. versionchanged:: 2.0207    When loading the env files, set the default encoding to UTF-8.208 209.. versionchanged:: 1.1.0210    Returns ``False`` when python-dotenv is not installed, or when211    the given path isn't a file.212 213.. versionadded:: 1.0214rN�.env�	.flaskenvzH * Tip: There are .env files present. Install python-dotenv to use them.�yellowT)rrF)r-r,)�usecwdzutf-8)�encoding)r�rvr_r`�isfiler�r�find_dotenv�
dotenv_values�itemsr�r�)r`r�r�r��default_name�default_path�keyrRs        rr�r��s��D��#%�D��1�L�$*�$6�$6�|�D�$6�$Q�Q�L�Q���(�(���(�H�H�D�	2���B�G�G�N�N�4�0�0��$�$�T�G�$�<�<���j�j�l�215���"�*�*���
����216�217�3��	#���:���;�	��2�7�7�>�>�&�)�)�R�W�W�^�^�K�-H�-H��K�K� ���	
��	�s�C�A/D>�=D>c��[5(agUb[R"SUS35 Ub#[R"SU(aSOS35 gg)zUShow extra startup messages the first time the server is run,218ignoring the reloader.219Nz * Serving Flask app '�'z * Debug mode: �on�off)r	r�r�)r�r�s  r�show_server_bannerr<sP�� �!�!���"�
�220�221�+�O�+<�A�>�?���
�222�223�_�U�T��$>�?�@�rc�@�\rSrSrSrSrSSjrS	SjrSrg)224�
CertParamTypeiz�Click option type for the ``--cert`` option. Allows either an225existing file, the string ``'adhoc'``, or an import for a226:class:`~ssl.SSLContext` object.227r`c�:�[R"SSSS9Ulg)NTF�rgr��resolve_path)r��Path�	path_type)r�s rr]�CertParamType.__init__s�����4�%�d�S��rc��SSKnUR	XU5$![a [R"SUU5Sef=f![Ra� [R228"XU5R
5nUS:Xa1SSKnO'![a [R"SUU5Sef=fUs$[USS9n[XdR5(aUs$ef=f)Nrz?Using "--cert" requires Python to be compiled with SSL support.�adhocz<Using ad-hoc certificates requires the cryptography library.T)�silent)�sslrvr�r�rC�STRING�lower�cryptographyr229r(�230SSLContext)r�rRr�r�rHrKr�s       r�convert�CertParamType.converts���	��	��>�>�%��4�4���	��$�$�Q�����	
�	���!�!�	��L�L��s�3�9�9�;�E���� �'��"� ��,�,�V���� �	 � ������d�3�C��#�~�~�.�.��231��)	�s7��A�$=�?C�B�C�$B)�)C�0&C�C)rCNr"�rRr�r�zclick.Parameter | Noner�r%r�r�)	rrrrrrWr]rMrrrrr>r>s9���232�D�T�"��"�#9�"�@T�"�	�"rr>c���URRS5nUS:HnSSKn[X5R5nUbmU(a[R"SX5eU(a[R"SUU5eU(d[R"SX5eX24URS'U$U(a%U(dU(d[R"S	X5eU$![233a SnN�f=f)234z�The ``--key`` option must be specified when ``--cert`` is a file.235Modifies the ``cert`` param to be a ``(cert, key)`` pair if needed.236�certrFrNFz.When "--cert" is "adhoc", "--key" is not used.z;When "--cert" is an SSLContext object, "--key" is not used.z "--cert" must also be specified.zRequired when using "--cert".)r��getrHr(rLrvr�r�)r�r�rRrQ�is_adhocrH�237is_contexts       r�
_validate_keyrUDs����:�:�>�>�&�!�D��w��H�6�� ��n�n�5�238�����$�$�@�#��
���$�$�M����
���$�$�%G��T�T�!�[��239�240�6���L���Z��$�$�%D�c�Q�Q��L��7���241��s�C�C(�'C(c�@^�\rSrSrSrSU4SjjrSrU=r$)�SeparatedPathTypeikz�Click option type that accepts a list of values separated by the242OS's path separator (``:``, ``;`` on Windows). Each value is243validated as a :class:`click.Path` type.244c�v>�URU5n[TU]nUVs/sHoe"XbU5PM
 sn$s snfro)�split_envvar_valuer�rM)r�rRr�r�r4�
super_convert�itemr�s       �rrM�SeparatedPathType.convertqs=����'�'��.�����
�<A�B�E�D�
�d�3�/�E�B�B��Bs�6rrO)rrrrrrMrr�r�s@rrWrWks8����245C��C�#9�C�@T�C�	�C�CrrW�runzRun a development server.)�246short_helpz--hostz-hz	127.0.0.1zThe interface to bind to.)�defaultr�z--portz-pi�zThe port to bind to.z--certz(Specify a certificate file to use HTTPS.)r�r�r�z--keyr@z2The key file to use when specifying a certificate.)r�r�r�r�z--reload/--no-reloadzVEnable or disable the reloader. By default the reloader is active if debug is enabled.z--debugger/--no-debuggerzVEnable or disable the debugger. By default the debugger is active if debug is enabled.z --with-threads/--without-threadsz!Enable or disable multithreading.z
--extra-fileszMExtra files that trigger a reload on change. Multiple paths are separated by rD)r_r�r�z--exclude-patternsznFiles matching these fnmatch patterns will not trigger a reload on change. Multiple patterns are separated by c	�8^�UR5n	[5nUcUnUcUn[
X�R5 [UUU	UUUUUUS9	 g![aAn247[5(a*[R"5 U248mSU4Sjjn	Sn249A250N~U251SeSn252A253ff=f)z�Run a local development server.254 255This server is for development purposes only. It does not provide256the stability, security, or performance of production WSGI servers.257 258The reloader and debugger are enabled by default with the '--debug'259option.260c�261>�TSeror)r��start_responsers  �rr!�run_command.<locals>.app�s
����t�#rN)�use_reloader�use_debugger�threaded�ssl_context�extra_files�exclude_patterns)r�rrbrr�zcabc.Iterable[bytes])	r�rr	rw�	print_excr
r<r�r)
r��host�port�reload�debugger�with_threadsrQrhrir!r5r�rs
            @rr�r�zs����P�#�}�}���$
��E�
�~��������u�2�2�3����������)�262��7��#�%�%�
���!��C�
$�(�
$�:G�
$�%�
$�
$������s�A�263B�4B�B�B�shellzRun a shell in the app context.c���SSKnS[RS[RS[R264S[R3n0n[RRS5nU(a][RRU5(a9[U5n[[UR5US5U5 SSS5 UR![R""55 [%[S	S5nUb3SSKnSS265KJn UR-U"U5R.5 U"5 UR3XS9 g!,(df   N�=f![0a N4f=f)a&Run an interactive Python shell in the context of a given266Flask application.  The application will populate the default267namespace of this shell according to its configuration.268 269This is useful for executing small snippets of management code270without having to manually configure the application.271rNr}z on z272App: z273Instance: �
PYTHONSTARTUP�exec�__interactivehook__)�	Completer)�banner�local)�coder9r�r�rr��
instance_pathr_r�rRr`r1�openrB�compile�readr�make_shell_contextr'�readline�rlcompleterru�
set_completer�completerv�interact)rxrvr��startupr?�interactive_hookr~rus        rr�r��s$����#�+�+��d�3�<�<�.�1��'�'�(�)� �.�.�/�	1��274�C��j�j�n�n�_�-�G��2�7�7�>�>�'�*�*�
�'�]�a�������7�F�3�S�9���J�J�{�-�-�/�0�275�s�$9�4�@���#�	<��-�
�"�"�9�S�>�#:�#:�;����M�M��M�+�/�]���	��	�s�"&E�	276E�277E�278E)�(E)�routeszShow the routes for the app.z--sortz-s)�endpoint�methods�domain�rule�matchr�zgMethod to sort routes by. 'match' is the order that Flask will match routes when dispatching a request.)r�r_r�z
--all-methodszShow HEAD and OPTIONS methods.)r�r�c�B^279^�[[RR55nU(d[R280"S5 gU(a281[
5OSS1n[RRm[U4SjU55n/nUH�nURSR[UR=(d282 [
5U-28355/nU(a7URT(aUROUR=(d S5 URUR 5 URU5 M� SS	/nS284S/n	U(a+URT(aSOS
5 U	RS5 URS5 U	RS5 UR#[%U	R'U55S9 UR+SU5 [-[/U55V285^286s/sHm287[1U2884SjU55PM nn289UR+SUVs/sHnSU-PM290 sn5 SRS[3U555n
UH&n[R291"U
R4"U65 M( g![(a N�f=fs sn292fs snf)z6Show all registered routes with endpoints and methods.zNo routes were registered.N�HEAD�OPTIONSc3�b># �UH$nT(aUROURv� M& g7fro)rk�	subdomain)�.0r��
host_matchings  �r�	<genexpr>�!routes_command.<locals>.<genexpr>7s"����V�PU��-�T�Y�Y�T�^�^�C�PU�s�,/z, r&�Endpoint�Methodsr�r��Host�	Subdomainr��Ruler�)r7rc3�@># �UHn[UT5v� M g7fro)r+)r��row�is  �rr�r�Vs����.��#�#�c�!�f�+�+��s�r�-z  c3�8# �UHupSUSUS3v� M g7f)�{z:<�}Nr)r�r��ws   rr�r�Xs"���G�5F�T�Q�2�a�S��1�#�R��5F�s�)r�r�url_map�293iter_rulesr�r�rr��anyr�rhrr�rfrkr�r��sortr�indexrSri�ranger+�max�	enumerate�format)r��all_methods�rules�ignored_methods�294has_domain�rowsr�r��headers�sortsr��widthsr��templater�s          `   @rr�r� s����
��$�$�/�/�1�2�E��
�295�296�/�0��*�c�e���0C�O��'�'�5�5�M��V�PU�V�V�J�
�D����M�M��I�I�f�d�l�l�3�c�e��F�G�H�297��298��J�J�]��	�	����M�2�N��299�300�4�9�9�����C����9�%�G�
��#�E������v�K�@�
���X���N�N�6��	�L�L���
��	�	�j����T�!2�3�	�4�	�K�K��7��8=�c�'�l�8K�
L�8K�1�c�.��.�.�8K�F�
L��K�K��V�,�V��C�!�G�V�,�-��y�y�G�Y�v�5F�G�G�H���
�301�302�8�?�?�C�(�)����
��
��M��,s�"'J�2J�#J303�304J�Jr{z�A general utility script for Flask applications.305 306An application to load must be given with the '--app' option,307'FLASK_APP' environment variable, or with a 'wsgi.py' or 'app.py' file308in the current directory.309)rWr�c�,�[R5 gro)r�mainrrrr�r�js���H�H�Jr�__main__)r0rr�r)r?zt.Callable[..., Flask]r�r�)r0rrUr#r�r)r`r#r�r#)T)rlr#rUr�rqzt.Literal[True]r�r).)rlr#rUr�rqzt.Literal[False]r��Flask | None)rlr#rUr�rqr�r�r�)r�r�r��click.ParameterrRr�r�r�)r?r�r�r�)r�r�r��click.OptionrRr�r�r�)r�r�r�r�rRr�r�zbool | None)r`r#r)r#r�r�)NT)r`zstr | os.PathLike[str] | Noner�r�r�r�)r�r�r�r�r�r�)r�r�r�r�rRr�r�r�)r�r�rkr#rl�intrmr�rnr�ror�rQzCssl.SSLContext | tuple[str, str | None] | t.Literal['adhoc'] | Nonerh�list[str] | Nonerir�r�r�r")r�r#r�r�r�r�)]�310__future__rrE�collections.abc�abc�cabc�importlib.metadatar�r,r_r�r�r9rw�typing�t�	functoolsr�operatorr�typesrr��311click.corerr|r�werkzeug.servingr	�werkzeug.utilsr312�globalsr�helpersr
r�
TYPE_CHECKINGrH�_typeshed.wsgirrrr!r�313UsageErrorrr6r/r[rm�overloadrrr��Optionr�r��make_pass_decorator�pass_script_info�TypeVar�Callable�Anyr�r��Groupr�r�r�r�r�r�rBr�r�r*r�r<�	ParamTyper>rUrWr��optionr`�pathsepr�r�rir��Choicer�rr�rrrr�<module>r�s|��"�314����	��	�315���$����&��5�(� �#�$��?�?��,�.�.��>�U�%�%�>�2�j�4M�`'�:���RV���� *��@O��316����317���SV���� *��@P������HL�4��4� *�4�@D�4��4�4
� ����M�	"��
��
�
��O�O�d�,�,�Z��E���I�I�c����C����J�/�0��(�2 .�u�{�{� .�F��l�l�	�7�O��	�318��
����"�����	��
�	�
��	��+��4>����0�<�<�	�<��	���4�%�	0�	Q���
���e-��e-�PJ�GK�A�319'�A�?C�A�	�A�HA�-�E�O�O�-�`$�NC��320�321�C����u�!<�=����h��k�8S�T����h��d�1G�H�����	��	3�
�	�����	���4�%�d�	C�
��	=�������322%�������323%�����&��	,��324�����	�	�	��W�W�_�_�/�q�	2�������	�	�	��G�G�O�O��a�	!�	��:�325�:�326
�:��:�
�	:�327�:��
:�N�:�"�:�'�:�328�:��	���
�
��
�I�U�>�j:�z�����!�]�+����w�#D�E��,,��F�,,�^���x�$B�C������	���H�	I��	'�
	����o�t�2R�S��.*��T�	�D�.*�b�	�329�	����z���F�r
codekingpro/portable-devtools · Team Ai