o
    oĎi	                     @   s   d dl Z d dlmZmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ e Z	 G d	d
 d
e	Zeje_G dd deZde_de_ee_ee_dS )    N)AnyOptional   )CloudImplementation)MissingCredentialsError   )LocalClient)	LocalPathc                       s$   e Zd ZdZeZ fddZ  ZS )LocalAzureBlobClientzReplacement for AzureBlobClient that uses the local file system. Intended as a monkeypatch
    substitute when writing tests.
    c                    s\   | dd | dd | dd tdd g}t j|i | tdd |D r,tdd S )Nblob_service_clientconnection_stringaccount_urlAZURE_STORAGE_CONNECTION_STRINGc                 s   s    | ]}|d u V  qd S N ).0optr   r   d/home/jeff/fluffinator/venv/lib/python3.10/site-packages/cloudpathlib/local/implementations/azure.py	<genexpr>   s    z0LocalAzureBlobClient.__init__.<locals>.<genexpr>ziAzureBlobClient does not support anonymous instantiation. Credentials are required; see docs for options.)getosgetenvsuper__init__allr   )selfargskwargs	cred_opts	__class__r   r   r      s   



zLocalAzureBlobClient.__init__)__name__
__module____qualname____doc__local_azure_blob_implementation_cloud_metar   __classcell__r   r   r   r   r
      s    r
   c                   @   s   e Zd ZU dZdZeed< eZe	defddZ
dd	ee fd
dZe	defddZe	defddZe	dd Ze	defddZdS )LocalAzureBlobPathzReplacement for AzureBlobPath that uses the local file system. Intended as a monkeypatch
    substitute when writing tests.
    zaz://cloud_prefixreturnc                 C   s   | j S r   )	containerr   r   r   r   drive1   s   zLocalAzureBlobPath.driveFNmodec                 C   s   d S r   r   )r   parentsexist_okr.   r   r   r   mkdir5   s   zLocalAzureBlobPath.mkdirc                 C   s   | j ddd S )N/   r   )
_no_prefixsplitr,   r   r   r   r+   9   s   zLocalAzureBlobPath.containerc                 C   s    | j }|dr|dd  }|S )Nr2   r3   )_no_prefix_no_drive
startswith)r   keyr   r   r   blob=   s   
zLocalAzureBlobPath.blobc                 C      | j | S r   client_md5r,   r   r   r   etagG      zLocalAzureBlobPath.etagc                 C   r:   r   r;   r,   r   r   r   md5K   r?   zLocalAzureBlobPath.md5)FFN)r!   r"   r#   r$   r)   str__annotations__r%   r&   propertyr-   r   r   r1   r+   r9   r>   r@   r   r   r   r   r(   )   s   
 	
r(   AzureBlobPathazure)r   typingr   r   	cloudpathr   
exceptionsr   localclientr   	localpathr	   r%   r
   	CloudPathrD   r(   r!   name_client_class_path_classr   r   r   r   <module>   s    '
