o
    Vh|                     @   s0   d Z ddlmZ ddlmZ G dd deZdS )zSubmodule containing the implementation for the FingerprintAdapter.

This file contains an implementation of a Transport Adapter that validates
the fingerprints of SSL certificates presented upon connection.
    )HTTPAdapter   )poolmanagerc                       s6   e Zd ZdZejdg Z fddZdddZ  ZS )	FingerprintAdaptera>  
    A HTTPS Adapter for Python Requests that verifies certificate fingerprints,
    instead of certificate hostnames.

    Example usage:

    .. code-block:: python

        import requests
        import ssl
        from requests_toolbelt.adapters.fingerprint import FingerprintAdapter

        twitter_fingerprint = '...'
        s = requests.Session()
        s.mount(
            'https://twitter.com',
            FingerprintAdapter(twitter_fingerprint)
        )

    The fingerprint should be provided as a hexadecimal string, optionally
    containing colons.
    fingerprintc                    s    || _ tt| jdi | d S )N )r   superr   __init__)selfr   kwargs	__class__r   z/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/requests_toolbelt/adapters/fingerprint.pyr	   &   s   zFingerprintAdapter.__init__Fc                 C   s   t j|||| jd| _ d S )N)	num_poolsmaxsizeblockassert_fingerprint)r   PoolManagerr   )r
   connectionsr   r   r   r   r   init_poolmanager+   s   z#FingerprintAdapter.init_poolmanager)F)	__name__
__module____qualname____doc__r   	__attrs__r	   r   __classcell__r   r   r   r   r      s
    r   N)r   requests.adaptersr   _compatr   r   r   r   r   r   <module>   s   