File: //home/arjun/projects/env/lib/python3.10/site-packages/boto/s3/__pycache__/__init__.cpython-310.pyc
o
we�
� @ s@ d dl mZmZ d dl mZ G dd� de�Zdd� Zdd� Zd S )
� )�
RegionInfo�get_regions)�connectc @ s e Zd Zdd� ZdS )�S3RegionInfoc K s | j r| j dd| ji|��S dS )a�
Connect to this Region's endpoint. Returns an connection
object pointing to the endpoint associated with this region.
You may pass any of the arguments accepted by the connection
class's constructor as keyword arguments and they will be
passed along to the connection object.
:rtype: Connection object
:return: The connection to this regions endpoint
�hostN� )�connection_cls�endpoint)�self� kw_paramsr r �I/home/arjun/projects/env/lib/python3.10/site-packages/boto/s3/__init__.pyr s �zS3RegionInfo.connectN)�__name__�
__module__�__qualname__r r r r r r s r c C s ddl m} tdt| d�S )z�
Get all available regions for the Amazon S3 service.
:rtype: list
:return: A list of :class:`boto.regioninfo.RegionInfo`
r ��S3Connection�s3��
region_clsr )�boto.s3.connectionr r r r r r r �regions/ s �r c K s\ ddl m} d|v r"|�d�}|dvr"td||d�}|jd i |��S td| ft|d�|��S )
Nr r r )� N�custom)�namer r r r r )r r �popr r )�region_namer r r �regionr r r �connect_to_region>