HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/docker/__pycache__/client.cpython-310.pyc
o

�2.a��@s�ddlmZddlmZmZddlmZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZGdd�d�ZejZdS)�)�	APIClient)�DEFAULT_TIMEOUT_SECONDS�DEFAULT_MAX_POOL_SIZE��ConfigCollection��ContainerCollection��ImageCollection��NetworkCollection��NodeCollection��PluginCollection��SecretCollection��ServiceCollection��Swarm��VolumeCollection)�kwargs_from_envc@s"eZdZdZdd�Zedd��Zedd��Zedd	��Z	ed
d��Z
edd
��Zedd��Zedd��Z
edd��Zedd��Zedd��Zedd��Zdd�Zejje_dd�Zejje_dd�Zejje_d d!�Zejje_d"d#�Zejje_d$d%�Zejje_d&d'�Zejje_d(d)�Zd*S)+�DockerClienta�
    A client for communicating with a Docker server.

    Example:

        >>> import docker
        >>> client = docker.DockerClient(base_url='unix://var/run/docker.sock')

    Args:
        base_url (str): URL to the Docker server. For example,
            ``unix:///var/run/docker.sock`` or ``tcp://127.0.0.1:1234``.
        version (str): The version of the API to use. Set to ``auto`` to
            automatically detect the server's version. Default: ``1.35``
        timeout (int): Default timeout for API calls, in seconds.
        tls (bool or :py:class:`~docker.tls.TLSConfig`): Enable TLS. Pass
            ``True`` to enable it with default options, or pass a
            :py:class:`~docker.tls.TLSConfig` object to use custom
            configuration.
        user_agent (str): Set a custom user agent for requests to the server.
        credstore_env (dict): Override environment variables when calling the
            credential store process.
        use_ssh_client (bool): If set to `True`, an ssh connection is made
            via shelling out to the ssh client. Ensure the ssh client is
            installed and configured on the host.
        max_pool_size (int): The maximum number of connections
            to save in the pool.
    cOst|i|��|_dS�N)r�api��self�args�kwargs�r!�//usr/lib/python3/dist-packages/docker/client.py�__init__,szDockerClient.__init__cKsR|�dt�}|�dt�}|�dd�}|�dd�}|d||||d�tdi|����S)	at
        Return a client configured from environment variables.

        The environment variables used are the same as those used by the
        Docker command-line client. They are:

        .. envvar:: DOCKER_HOST

            The URL to the Docker host.

        .. envvar:: DOCKER_TLS_VERIFY

            Verify the host against a CA certificate.

        .. envvar:: DOCKER_CERT_PATH

            A path to a directory containing TLS certificates to use when
            connecting to the Docker host.

        Args:
            version (str): The version of the API to use. Set to ``auto`` to
                automatically detect the server's version. Default: ``auto``
            timeout (int): Default timeout for API calls, in seconds.
            max_pool_size (int): The maximum number of connections
                to save in the pool.
            ssl_version (int): A valid `SSL version`_.
            assert_hostname (bool): Verify the hostname of the server.
            environment (dict): The environment to read environment variables
                from. Default: the value of ``os.environ``
            credstore_env (dict): Override environment variables when calling
                the credential store process.
            use_ssh_client (bool): If set to `True`, an ssh connection is
                made via shelling out to the ssh client. Ensure the ssh
                client is installed and configured on the host.

        Example:

            >>> import docker
            >>> client = docker.from_env()

        .. _`SSL version`:
            https://docs.python.org/3.5/library/ssl.html#ssl.PROTOCOL_TLSv1
        �timeout�
max_pool_size�versionN�use_ssh_clientF)r$r%r&r'r!)�poprrr)�clsr r$r%r&r'r!r!r"�from_env/s-��zDockerClient.from_envcC�
t|d�S)z�
        An object for managing configs on the server. See the
        :doc:`configs documentation <configs>` for full details.
        ��clientr�rr!r!r"�configsi�
zDockerClient.configscCr+)z�
        An object for managing containers on the server. See the
        :doc:`containers documentation <containers>` for full details.
        r,rr.r!r!r"�
containersqr0zDockerClient.containerscCr+)z�
        An object for managing images on the server. See the
        :doc:`images documentation <images>` for full details.
        r,r	r.r!r!r"�imagesyr0zDockerClient.imagescCr+)z�
        An object for managing networks on the server. See the
        :doc:`networks documentation <networks>` for full details.
        r,rr.r!r!r"�networks�r0zDockerClient.networkscCr+)z�
        An object for managing nodes on the server. See the
        :doc:`nodes documentation <nodes>` for full details.
        r,r
r.r!r!r"�nodes�r0zDockerClient.nodescCr+)z�
        An object for managing plugins on the server. See the
        :doc:`plugins documentation <plugins>` for full details.
        r,rr.r!r!r"�plugins�r0zDockerClient.pluginscCr+)z�
        An object for managing secrets on the server. See the
        :doc:`secrets documentation <secrets>` for full details.
        r,rr.r!r!r"�secrets�r0zDockerClient.secretscCr+)z�
        An object for managing services on the server. See the
        :doc:`services documentation <services>` for full details.
        r,rr.r!r!r"�services�r0zDockerClient.servicescCr+)z�
        An object for managing a swarm on the server. See the
        :doc:`swarm documentation <swarm>` for full details.
        r,rr.r!r!r"�swarm�r0zDockerClient.swarmcCr+)z�
        An object for managing volumes on the server. See the
        :doc:`volumes documentation <volumes>` for full details.
        r,rr.r!r!r"�volumes�r0zDockerClient.volumescO�|jj|i|��Sr)r�eventsrr!r!r"r;��zDockerClient.eventscC�
|j��Sr)r�dfr.r!r!r"r>��
zDockerClient.dfcOr:r)r�inforr!r!r"r@�r<zDockerClient.infocOr:r)r�loginrr!r!r"rA�r<zDockerClient.logincOr:r)r�pingrr!r!r"rB�r<zDockerClient.pingcOr:r)rr&rr!r!r"r&�r<zDockerClient.versioncCr=r)r�closer.r!r!r"rC�r?zDockerClient.closecCs0d|�d�g}tt|�r|�d�td�|���)Nz('DockerClient' object has no attribute '�'z�In Docker SDK for Python 2.0, this method is now on the object APIClient. See the low-level API section of the documentation for more details.� )�hasattrr�append�AttributeError�join)r�name�sr!r!r"�__getattr__�s

zDockerClient.__getattr__N)�__name__�
__module__�__qualname__�__doc__r#�classmethodr*�propertyr/r1r2r3r4r5r6r7r8r9r;rr>r@rArBr&rCrLr!r!r!r"rsP
9
















rN)�
api.clientr�	constantsrr�models.configsr�models.containersr�
models.imagesr
�models.networksr�models.nodesr�models.pluginsr�models.secretsr�models.servicesr�models.swarmr�models.volumesr�utilsrrr*r!r!r!r"�<module>s 
Q