https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/boto/gs/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/boto/gs/__pycache__/connection.cpython-310.pyc
o

ckF[f�@s`ddlmZddlmZddlmZddlmZddlmZGdd�de�Z	Gdd	�d	e�Z
d
S)�)�Bucket)�S3Connection)�SubdomainCallingFormat)�check_lowercase_bucketname)�get_utf8_valuec@seZdZdZdZdS)�Location�US�EUN)�__name__�
__module__�__qualname__�DEFAULTr	�rr�4/usr/lib/python3/dist-packages/boto/gs/connection.pyrsrcsbeZdZdZdZddddddddedde�ddf�fdd�	Zdejdd	fd
d�Z	ddd
�Z
�ZS)�GSConnectionzstorage.googleapis.comz)Signature=%s&Expires=%d&GoogleAccessId=%sNTr�/cs4tt|�j|||||||||	|
|||
dt|d�dS)N�google)�suppress_consec_slashes)�superr�__init__r)�self�gs_access_key_id�gs_secret_access_key�	is_secure�port�proxy�
proxy_port�
proxy_user�
proxy_pass�host�debug�https_connection_factory�calling_format�pathr��	__class__rrr%s

�zGSConnection.__init__�STANDARDcCs�t|�|r|r|||jj<n|jj|i}|stj}d|}|r%d|}nd}d||f}|jdt|�|t|�d�}	|	��}
|	jdkrM|j�	|	j|	j
|
��|	jdkrX|�||�S|j�|	j|	j
|
��)	a�
        Creates a new bucket. By default it's located in the USA. You can
        pass Location.EU to create bucket in the EU. You can also pass
        a LocationConstraint for where the bucket should be located, and
        a StorageClass describing how the data should be stored.

        :type bucket_name: string
        :param bucket_name: The name of the new bucket.

        :type headers: dict
        :param headers: Additional headers to pass along with the request to GCS.

        :type location: :class:`boto.gs.connection.Location`
        :param location: The location of the new bucket.

        :type policy: :class:`boto.gs.acl.CannedACLStrings`
        :param policy: A canned ACL policy that will be applied to the new key
                       in GCS.

        :type storage_class: string
        :param storage_class: Either 'STANDARD' or 'DURABLE_REDUCED_AVAILABILITY'.

        z+<LocationConstraint>%s</LocationConstraint>z<StorageClass>%s</StorageClass>�z;<CreateBucketConfiguration>%s%s</CreateBucketConfiguration>�PUT)�headers�datai���)
r�provider�
acl_headerrr
�make_requestr�read�status�storage_create_error�reason�bucket_class�storage_response_error)r�bucket_namer)�location�policy�
storage_class�
location_elem�storage_class_elemr*�response�bodyrrr�
create_bucket1s@���
�

�

�zGSConnection.create_bucketcCs"|�||�}|r|j|dd�|S)a�
        Retrieves a bucket by name.

        If the bucket does not exist, an ``S3ResponseError`` will be raised. If
        you are unsure if the bucket exists or not, you can use the
        ``S3Connection.lookup`` method, which will either return a valid bucket
        or ``None``.

        :type bucket_name: string
        :param bucket_name: The name of the bucket

        :type headers: dict
        :param headers: Additional headers to pass along with the request to
            AWS.

        :type validate: boolean
        :param validate: If ``True``, it will try to fetch all keys within the
            given bucket. (Default: ``True``)
        r)�maxkeys)r3�get_all_keys)rr5�validater)�bucketrrr�
get_bucketjszGSConnection.get_bucket)TN)r
rr�DefaultHost�QueryStringrrrr
r=rB�
__classcell__rrr$rr s�
�9rN)�boto.gs.bucketr�boto.s3.connectionrrr�
boto.utilsr�objectrrrrrr�<module>s

https://t.me/RX1948 - 2025