Ë
    9àix  ã                   ó@   — d dl Z d dlmZ ddlmZmZmZ  G d„ d«      Zy)é    N)Údatetimeé   )ÚauthÚtypesÚutilsc                   ód   — e Zd Z ej                  d«      d„ «       Zd	d„Zd„ Z	 	 d
d„Zd„ Z	dd„Z
y)ÚDaemonApiMixinz1.25c                 óf   — | j                  d«      }| j                  | j                  |«      d«      S )a(  
        Get data usage information.

        Returns:
            (dict): A dictionary representing different resource categories
            and their respective data usage.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        z
/system/dfT©Ú_urlÚ_resultÚ_get)ÚselfÚurls     úR/home/factor_ks/STREAMA2026/venv/lib/python3.12/site-packages/docker/api/daemon.pyÚdfzDaemonApiMixin.df   s+   € ð �i‰i˜Ó%ˆØ�|‰|˜DŸI™I c›N¨DÓ1Ð1ó    Nc                 ón  — t        |t        «      rt        j                  |«      }t        |t        «      rt        j                  |«      }|rt        j                  |«      }|||dœ}| j                  d«      }| j                  ||dd¬«      }| j                  ||¬«      }t        j                  ||«      S )ar  
        Get real-time events from the server. Similar to the ``docker events``
        command.

        Args:
            since (UTC datetime or int): Get events from this point
            until (UTC datetime or int): Get events until this point
            filters (dict): Filter the events by event time, container or image
            decode (bool): If set to true, stream will be decoded into dicts on
                the fly. False by default.

        Returns:
            A :py:class:`docker.types.daemon.CancellableStream` generator

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.

        Example:

            >>> for event in client.events(decode=True)
            ...   print(event)
            {u'from': u'image/with:tag',
             u'id': u'container-id',
             u'status': u'start',
             u'time': 1423339459}
            ...

            or

            >>> events = client.events()
            >>> for event in events:
            ...   print(event)
            >>> # and cancel from another thread
            >>> events.close()
        )ÚsinceÚuntilÚfiltersz/eventsTN)ÚparamsÚstreamÚtimeout)Údecode)
Ú
isinstancer   r   Údatetime_to_timestampÚconvert_filtersr   r   Ú_stream_helperr   ÚCancellableStream)	r   r   r   r   r   r   r   Úresponser   s	            r   ÚeventszDaemonApiMixin.events   s¬   € ôL �eœXÔ&Ü×/Ñ/°Ó6ˆEä�eœXÔ&Ü×/Ñ/°Ó6ˆEáÜ×+Ñ+¨GÓ4ˆGð ØØñ
ˆð
 �i‰i˜	Ó"ˆà—9‘9˜S¨¸Àd�9ÓKˆØ×$Ñ$ X°fÐ$Ó=ˆä×&Ñ& v¨xÓ8Ð8r   c                 ób   — | j                  | j                  | j                  d«      «      d«      S )a  
        Display system-wide information. Identical to the ``docker info``
        command.

        Returns:
            (dict): The info as a dict

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        z/infoT©r   r   r   ©r   s    r   ÚinfozDaemonApiMixin.infoS   s'   € ð �|‰|˜DŸI™I d§i¡i°Ó&8Ó9¸4Ó@Ð@r   c                 ó~  — |rFt         j                  j                  |«      r't        j                  || j
                  ¬«      | _        nG| j                  r| j                  j                  r%t        j                  | j
                  ¬«      | _        | j                  j                  |«      }|r|j                  dd«      |k(  r|s|S ||||dœ}| j                  | j                  d«      |¬«      }	|	j                  dk(  r.| j                  j                  |xs t        j                  |«       | j                  |	d¬	«      S )
a^  
        Authenticate with a registry. Similar to the ``docker login`` command.

        Args:
            username (str): The registry username
            password (str): The plaintext password
            email (str): The email for the registry account
            registry (str): URL to the registry.  E.g.
                ``https://index.docker.io/v1/``
            reauth (bool): Whether or not to refresh existing authentication on
                the Docker server.
            dockercfg_path (str): Use a custom path for the Docker config file
                (default ``$HOME/.docker/config.json`` if present,
                otherwise ``$HOME/.dockercfg``)

        Returns:
            (dict): The response from the login request

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        )Úcredstore_envÚusernameN)r)   ÚpasswordÚemailÚserveraddressz/auth)ÚdataéÈ   T©Újson)ÚosÚpathÚexistsr   Úload_configr(   Ú_auth_configsÚis_emptyÚresolve_authconfigÚgetÚ
_post_jsonr   Ústatus_codeÚadd_authÚ
INDEX_NAMEr   )
r   r)   r*   r+   ÚregistryÚreauthÚdockercfg_pathÚauthcfgÚreq_datar!   s
             r   ÚloginzDaemonApiMixin.logina   s  € ñ: œbŸg™gŸn™n¨^Ô<Ü!%×!1Ñ!1Ø¨d×.@Ñ.@ô"ˆDÕð ×#Ò# t×'9Ñ'9×'BÒ'BÜ!%×!1Ñ!1Ø"×0Ñ0ô"ˆDÔð ×$Ñ$×7Ñ7¸ÓAˆñ �w—{‘{ :¨tÓ4¸Ò@ÙØˆNð !Ø ØØ%ñ	
ˆð —?‘? 4§9¡9¨WÓ#5¸H�?ÓEˆØ×Ñ 3Ò&Ø×Ñ×'Ñ'¨Ò(C´D·O±OÀXÔNØ�|‰|˜H¨4ˆ|Ó0Ð0r   c                 óf   — | j                  | j                  | j                  d«      «      «      dk(  S )a!  
        Checks the server is responsive. An exception will be raised if it
        isn't responding.

        Returns:
            (bool) The response from the server.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        z/_pingÚOKr$   r%   s    r   ÚpingzDaemonApiMixin.pingš   s*   € ð �|‰|˜DŸI™I d§i¡i°Ó&9Ó:Ó;¸tÑCÐCr   c                 ól   — | j                  d|¬«      }| j                  | j                  |«      d¬«      S )a&  
        Returns version information from the server. Similar to the ``docker
        version`` command.

        Returns:
            (dict): The server version information

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        z/version)Úversioned_apiTr/   r   )r   Úapi_versionr   s      r   ÚversionzDaemonApiMixin.version¨   s1   € ð �i‰i˜
°+ˆiÓ>ˆØ�|‰|˜DŸI™I c›N°ˆ|Ó6Ð6r   )NNNN)NNNFN)T)Ú__name__Ú
__module__Ú__qualname__r   Úminimum_versionr   r"   r&   rB   rE   rI   © r   r   r	   r	      sH   „ Ø€U×Ñ˜6Ó"ñ2ó #ð2ó99òvAð CGØ+/ó71òrDô7r   r	   )r1   r   Ú r   r   r   r	   rN   r   r   ú<module>rP      s   ðÛ 	Ý ç !Ñ !÷n7ò n7r   