Skip to main content
Glama

ClickUp Operator

by noah-vh
applications.cpython-312.pyc12.8 kB
� �MMg�(��D�ddlmZddlZddlZddlZej dk\rddlmZnddlmZddlm Z m Z ddl m Z m Z ddlmZddlmZdd lmZdd lmZdd lmZdd lmZmZdd lmZmZmZmZm Z m!Z!ddl"m#Z#ejHdd��Z%ed�Z&Gd�d�Z'y)�)� annotationsN)�� )� ParamSpec)�State�URLPath)� Middleware�_MiddlewareFactory)�BaseHTTPMiddleware)�ServerErrorMiddleware)�ExceptionMiddleware)�Request)�Response)� BaseRoute�Router)�ASGIApp�ExceptionHandler�Lifespan�Receive�Scope�Send)� WebSocket�AppType� Starlette)�bound�Pc�L�eZdZdZ d dd�Zdd�Zedd��Zdd�Zdd�Z dd�Z ddd �Z ddd �Z dd �Z dd �Z d d �Z d! d"d�Z d d#d�Zd$d�Z d! d%d�Zdd&d�Zd'd�Zy)(raC Creates an application instance. **Parameters:** * **debug** - Boolean indicating if debug tracebacks should be returned on errors. * **routes** - A list of routes to serve incoming HTTP and WebSocket requests. * **middleware** - A list of middleware to run for every request. A starlette application will always automatically include two middleware classes. `ServerErrorMiddleware` is added as the very outermost middleware, to handle any uncaught errors occurring anywhere in the entire stack. `ExceptionMiddleware` is added as the very innermost middleware, to deal with handled exception cases occurring in the routing or endpoints. * **exception_handlers** - A mapping of either integer status codes, or exception class types onto callables which handle the exceptions. Exception handler callables should be of the form `handler(request, exc) -> response` and may be either standard functions, or async functions. * **on_startup** - A list of callables to run on application startup. Startup handler callables do not take any arguments, and may be either standard functions, or async functions. * **on_shutdown** - A list of callables to run on application shutdown. Shutdown handler callables do not take any arguments, and may be either standard functions, or async functions. * **lifespan** - A lifespan context function, which can be used to perform startup and shutdown tasks. This is a newer style that replaces the `on_startup` and `on_shutdown` handlers. Use one or the other, not both. Nc���|� |�|�Jd��||_t�|_t||||��|_|�in t |�|_|�gn t|�|_d|_ y)Nz>Use either 'lifespan' or 'on_startup'/'on_shutdown', not both.)� on_startup� on_shutdown�lifespan) �debugr�stater�router�dict�exception_handlers�list�user_middleware�middleware_stack)�selfr"�routes� middlewarer&rr r!s �bC:\Users\noahv\Documents\GitHub\clickup-operator\.venv\Lib\site-packages\starlette/applications.py�__init__zStarlette.__init__9s���� � �;�#6� L� K� L� ��� ��W�� ��V� � �^f�g�� �(:�(B�"��M_�H`���%/�%7�r�T�*�=M���04���c�N�|j}d}i}|jj�D]\}}|dtfvr|}�|||<�t t ||��g|j zt t||��gz}|j}t|�D]\}} } ||g| ��i| ��}�|S)Ni�)�handlerr")�handlersr") r"r&�items� Exceptionr r r(r r$�reversed) r*r"� error_handlerr&�key�valuer,�app�cls�args�kwargss r-�build_middleware_stackz Starlette.build_middleware_stackPs���� � ��� �`b���1�1�7�7�9�J�C���s�I�&�&� %� �*/�"�3�'� :��-�}�E� R� S��"�"� #��-�8J�RW�X�Y� Z� � �k�k��!)�*�!5� �C��v��c�+�D�+�F�+�C�"6�� r/c�.�|jjS�N)r$r+)r*s r-r+zStarlette.routesfs���{�{�!�!�!r/c �<�|jj|fi|��Sr?)r$� url_path_for)r*�name� path_paramss r-rAzStarlette.url_path_forjs��'�t�{�{�'�'��<� �<�<r/c��K�||d<|j�|j�|_|j|||��d{���y7��w)Nr9)r)r=)r*�scope�receive�sends r-�__call__zStarlette.__call__msD������e� � � � � (�$(�$?�$?�$A�D� !��#�#�E�7�D�9�9�9�s�=A�A�Ac�8�|jj|�Sr?)r$�on_event)r*� event_types r-rJzStarlette.on_eventss���{�{�#�#�J�/�/r/c�@�|jj|||��y�N)r9rB)r$�mount)r*�pathr9rBs r-rNzStarlette.mountvs�� � � ���$�C�d��3r/c�@�|jj|||��yrM)r$�host)r*rQr9rBs r-rQzStarlette.hostys�� � � ����3�T��2r/c��|j� td��|jjdt |g|��i|���y)Nz6Cannot add middleware after an application has startedr)r)� RuntimeErrorr(�insertr )r*�middleware_classr;r<s r-�add_middlewarezStarlette.add_middleware|sB�� � � � ,��W�X� X� ���#�#�A�z�2B�'T�T�'T�V�'T�Ur/c�"�||j|<yr?)r&)r*�exc_class_or_status_coder1s r-�add_exception_handlerzStarlette.add_exception_handler�s�� =D���� 8�9r/c�<�|jj||�yr?)r$�add_event_handler)r*rK�funcs r-r[zStarlette.add_event_handler�s�� � � �%�%�j�$�7r/c�D�|jj|||||��y�N)�methodsrB�include_in_schema�r$� add_route)r*rO�router_rBr`s r-rbzStarlette.add_route�s"�� � � ���d�E�7��Yj��kr/c�@�|jj|||��y�N)rB�r$�add_websocket_route)r*rOrcrBs r-rgzStarlette.add_websocket_route�s�� � � �'�'��e�$�'�?r/c�L���tjdt�d��fd� }|S)Nz�The `exception_handler` decorator is deprecated, and will be removed in version 1.0.0. Refer to https://www.starlette.io/exceptions/ for the recommended approach.c�,���j�|�|Sr?)rY)r\rXr*s ��r-� decoratorz.Starlette.exception_handler.<locals>.decorator�s��� � &� &�'?�� F��Kr/�r\�typing.Callable�returnrl��warnings�warn�DeprecationWarning)r*rXrjs`` r-�exception_handlerzStarlette.exception_handler�s%���� � � Z� � �  ��r/c�X������tjdt�d�����fd� }|S)z� We no longer document this decorator style API, and its usage is discouraged. Instead you should use the following approach: >>> routes = [Route(path, endpoint=...), ...] >>> app = Starlette(routes=routes) z�The `route` decorator is deprecated, and will be removed in version 1.0.0. Refer to https://www.starlette.io/routing/ for the recommended approach.c�H���jj�|�����|Sr^ra)r\r`r_rBrOr*s �����r-rjz"Starlette.route.<locals>.decorator�s0��� �K�K� !� !�����"3� "� ��Kr/rkrn)r*rOr_rBr`rjs````` r-rczStarlette.route�s,��� � � � W� � �  � ��r/c�P����tjdt�d���fd� }|S)a We no longer document this decorator style API, and its usage is discouraged. Instead you should use the following approach: >>> routes = [WebSocketRoute(path, endpoint=...), ...] >>> app = Starlette(routes=routes) z�The `websocket_route` decorator is deprecated, and will be removed in version 1.0.0. Refer to https://www.starlette.io/routing/#websocket-routing for the recommended approach.c�D���jj�|���|Srerf)r\rBrOr*s ���r-rjz,Starlette.websocket_route.<locals>.decorator�s!��� �K�K� +� +�D�$�T� +� B��Kr/rkrn)r*rOrBrjs``` r-�websocket_routezStarlette.websocket_route�s'��� � � � i� � �  ��r/c�`��tjdt�|dk(sJd��d�fd� }|S)z� We no longer document this decorator style API, and its usage is discouraged. Instead you should use the following approach: >>> middleware = [Middleware(...), ...] >>> app = Starlette(middleware=middleware) z�The `middleware` decorator is deprecated, and will be removed in version 1.0.0. Refer to https://www.starlette.io/middleware/#using-middleware for recommended approach.�httpz/Currently only middleware("http") is supported.c�6���jt|��|S)N)�dispatch)rVr )r\r*s �r-rjz'Starlette.middleware.<locals>.decorator�s��� � � � 2�T� � B��Kr/rkrn)r*�middleware_typerjs` r-r,zStarlette.middleware�s=��� � � � g� � � �&�(�[�*[�[�(� ��r/)FNNNNNN)r*rr"�boolr+z!typing.Sequence[BaseRoute] | Noner,z"typing.Sequence[Middleware] | Noner&z3typing.Mapping[typing.Any, ExceptionHandler] | Noner�7typing.Sequence[typing.Callable[[], typing.Any]] | Noner r~r!zLifespan[AppType] | Nonerm�None)rmr)rmzlist[BaseRoute])rB�strrCz typing.Anyrmr)rErrFrrGrrmr)rKr�rmrlr?)rOr�r9rrB� str | Nonermr)rQr�r9rrBr�rmr)rUz_MiddlewareFactory[P]r;zP.argsr<zP.kwargsrmr)rX�int | type[Exception]r1rrmr)rKr�r\rlrmr)NNT) rOr�rczAtyping.Callable[[Request], typing.Awaitable[Response] | Response]r_�list[str] | NonerBr�r`r}rmr)rOr�rcz4typing.Callable[[WebSocket], typing.Awaitable[None]]rBr�rmr)rXr�rmrl) rOr�r_r�rBr�r`r}rmrl)rOr�rBr�rmrl)r|r�rmrl)�__name__� __module__� __qualname__�__doc__r.r=�propertyr+rArHrJrNrQrVrYr[rbrgrrrcrwr,�r/r-rrs����>�48�9=�RV�NR�OS�-1�5��5��5�2�5�7� 5� P� 5� L� 5�M�5�+�5� �5�.�,�"��"�=�:� 0�4�3�V�/�V��V�� V� � V�D�"7�D�"�D� � D�8��8��8� � 8�%)��"&� l��l�Q�l�"� l� � l�  � l� �l� � @��@�D�@�� @� � @� � %)��"&� ���"��� �  � � � �@�(r/)(� __future__r�sys�typingro� version_infor�typing_extensions�starlette.datastructuresrr�starlette.middlewarer r �starlette.middleware.baser �starlette.middleware.errorsr �starlette.middleware.exceptionsr �starlette.requestsr�starlette.responsesr�starlette.routingrr�starlette.typesrrrrrr�starlette.websocketsr�TypeVarrrrr�r/r-�<module>r�sm��"� � �����w�� �+�3�?�8�=�?�&�(�/�U�U�*� �&�.�.��+� 6�� �c�N��_�_r/

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/noah-vh/mcp-server-clickup'

If you have feedback or need assistance with the MCP directory API, please join our Discord server