
    ^h]                     b    S r SSKrSSKJr  SSKJr  SSKJr  Sr " S S	\5      r	S
r
S\
-  \	4/rg)z-Tornado handlers for frontend config storage.    N)web)
authorized   )
APIHandlerconfigc                       \ rS rSrSr\r\R                  \	S 5       5       r
\R                  \	S 5       5       r\R                  \	S 5       5       rSrg)ConfigHandler   zA config API handler.c                     U R                  SS5        U R                  [        R                  " U R                  R                  U5      5      5        g)zGet config by section name.zContent-Typezapplication/jsonN)
set_headerfinishjsondumpsconfig_managerget)selfsection_names     a/home/james-whalen/.local/lib/python3.13/site-packages/jupyter_server/services/config/handlers.pyr   ConfigHandler.get   s9     	(:;DJJt2266|DEF    c                 |    U R                  5       nU R                  R                  X5        U R                  S5        g)zSet a config section by name.   N)get_json_bodyr   set
set_status)r   r   datas      r   putConfigHandler.put   s2     !!#3r   c                     U R                  5       nU R                  R                  X5      nU R                  [        R
                  " U5      5        g)z Update a config section by name.N)r   r   updater   r   r   )r   r   new_datasections       r   patchConfigHandler.patch$   s=     %%'%%,,\DDJJw'(r    N)__name__
__module____qualname____firstlineno____doc__AUTH_RESOURCEauth_resourcer   authenticatedr   r   r   r#   __static_attributes__r%   r   r   r	   r	      sp    !MG  G
 	   	)  )r   r	   z(?P<section_name>\w+)z/api/config/%s)r*   r   tornador   jupyter_server.auth.decoratorr   base.handlersr   r+   r	   section_name_regexdefault_handlersr%   r   r   <module>r4      sG    3   4 ')J )> .  ++]; r   