File: //usr/lib/python3/dist-packages/boto/sdb/__pycache__/connection.cpython-310.pyc
o
ckF[�e � @ s� d dl Zd dlZd dlZd dlmZ d dlmZ d dlmZm Z d dl
mZ d dlm
Z
d dlmZ G dd � d ej�ZG d
d� de�ZdS )� N)�handler)�AWSQueryConnection)�Domain�DomainMetaData)�Item)�
SDBRegionInfo)�SDBResponseErrorc s( e Zd ZdZ� fdd�Zdd� Z� ZS )�
ItemThreadaj
A threaded :class:`Item <boto.sdb.item.Item>` retriever utility class.
Retrieved :class:`Item <boto.sdb.item.Item>` objects are stored in the
``items`` instance variable after :py:meth:`run() <run>` is called.
.. tip:: The item retrieval will not start until
the :func:`run() <boto.sdb.connection.ItemThread.run>` method is called.
c s0 t t| �j|d� || _t� | _|| _g | _dS )a�
:param str name: A thread name. Used for identification.
:param str domain_name: The name of a SimpleDB
:class:`Domain <boto.sdb.domain.Domain>`
:type item_names: string or list of strings
:param item_names: The name(s) of the items to retrieve from the specified
:class:`Domain <boto.sdb.domain.Domain>`.
:ivar list items: A list of items retrieved. Starts as empty list.
)�nameN)�superr �__init__�domain_name�
SDBConnection�conn�
item_names�items)�selfr
r
r �� __class__� �5/usr/lib/python3/dist-packages/boto/sdb/connection.pyr ( s
zItemThread.__init__c C s, | j D ]}| j�| j|�}| j�|� qdS )z�
Start the threaded retrieval of items. Populates the
``items`` list with :class:`Item <boto.sdb.item.Item>` objects.
N)r r �get_attributesr
r �append)r � item_name�itemr r r �run9 s
�zItemThread.run)�__name__�
__module__�__qualname__�__doc__r r �
__classcell__r r r r r s r c s e Zd ZdZdZdZdZeZ d8� fd d
� Z dd� Z
d
d� Z d9dd�Zdd� Z
d:dd�Zdd� Zdd� Zdd� Zd;dd�Zd;dd �Zd<d!d"�Zd#d$� Zd%d&� Zd'd(� Zd)d*� Z d=d+d,�Zd;d-d.�Z d>d/d0�Z d<d1d2�Zd3d4� Z d?d6d7�Z� ZS )@r a�
This class serves as a gateway to your SimpleDB region (defaults to
us-east-1). Methods within allow access to SimpleDB
:class:`Domain <boto.sdb.domain.Domain>` objects and their associated
:class:`Item <boto.sdb.item.Item>` objects.
.. tip::
While you may instantiate this class directly, it may be easier to
go through :py:func:`boto.connect_sdb`.
z us-east-1zsdb.us-east-1.amazonaws.comz
2009-04-15NTr �/c s� |st j�dd| j�}t j�� D ]}|j|kr|} nq|| _tt | �j
||||||||| jj| |
||||d� d| _|
| _
t| _dS )aZ
For any keywords that aren't documented, refer to the parent class,
:py:class:`boto.connection.AWSAuthConnection`. You can avoid having
to worry about these keyword arguments by instantiating these objects
via :py:func:`boto.connect_sdb`.
:type region: :class:`boto.sdb.regioninfo.SDBRegionInfo`
:keyword region: Explicitly specify a region. Defaults to ``us-east-1``
if not specified. You may also specify the region in your ``boto.cfg``:
.. code-block:: cfg
[SDB]
region = eu-west-1
�SDB�region)�security_token�validate_certs�profile_nameg N)�boto�config�get�DefaultRegionName�sdb�regionsr
r# r r r �endpoint� box_usage� converterr �item_cls)r �aws_access_key_id�aws_secret_access_key� is_secure�port�proxy�
proxy_port�
proxy_user�
proxy_pass�debug�https_connection_factoryr# �pathr/ r$ r% r&