/usr/lib/rads/venv/lib/python3.13/site-packages/boto3/resources/__pycache__
Edit: /usr/lib/rads/venv/lib/python3.13/site-packages/boto3/resources/__pycache__/factory.cpython-313.pyc (19012B)
jX S SK r S SKJr SSKJr SSKJr SSKJrJ r SSK
JrJr SS K
Jr SS
KJr SSKJrJr \ R( " \5 r " S S
5 rg) N)partial ) docstring)ResourceLoadException )
ServiceActionWaiterAction)ResourceMetaServiceResource)CollectionFactory)
ResourceModel)ResourceHandlerbuild_identifiersc \ rS rSrSrS rS rS rS rS r S r
S rS
rS r
S rS
rS rS rS rS rS r SS jrSrg)ResourceFactory a?
A factory to create new :py:class:`~boto3.resources.base.ServiceResource`
classes from a :py:class:`~boto3.resources.model.ResourceModel`. There are
two types of lookups that can be done: one on the service itself (e.g. an
SQS resource) and another on models contained within the service (e.g. an
SQS Queue resource).
c . [ 5 U l Xl g N)r _collection_factory_emitter)selfemitters J/usr/lib/rads/venv/lib/python3.13/site-packages/boto3/resources/factory.py__init__ResourceFactory.__init__% s #4#6
c [ R SUR U5 [ UUUR 5 nSnUR
( a% UR R UR
5 nUR U5 [ UR US9nSU0nU R UUUUS9 U R UUUUS9 U R UUUUUS9 U R UUUS9 U R UUUUS9 U R UUUUS9 UnUR U:X a S nUR S
- U- n[ /n U R" b U R" R% SU 3UU US9 [' [) U5 [+ U 5 U5 $ )
a
Loads a resource from a model, creating a new
:py:class:`~boto3.resources.base.ServiceResource` subclass
with the correct properties and methods, named based on the service
and resource name, e.g. EC2.Instance.
:type resource_name: string
:param resource_name: Name of the resource to look up. For services,
this should match the ``service_name``.
:type single_resource_json_definition: dict
:param single_resource_json_definition:
The loaded json of a single service resource or resource
definition.
:type service_context: :py:class:`~boto3.utils.ServiceContext`
:param service_context: Context about the AWS service
:rtype: Subclass of :py:class:`~boto3.resources.base.ServiceResource`
:return: The service or resource class.
z
Loading %s:%sN)resource_modelmeta)attrsr
resource_namer )r r! r service_context)r r r! r r" )r r r" r .zcreating-resource-class.)class_attributesbase_classesr" )loggerdebugservice_namer
resource_json_definitionsshape
service_model shape_forload_rename_mapr
_load_identifiers
_load_actions_load_attributes_load_collections_load_has_relations
_load_waitersr r emittypestrtuple)
r r! single_resource_json_definitionr" r r* r r cls_namer% s
r load_from_definition$ResourceFactory.load_from_definition) s 0 _99=
'+55
#11;;$$E &&u- ((
D
')
')+
')+
)+
')+ !
')+
!''=8(H"//#5@'(==$MM*8*5!&) /
CM5#6>>r c UR HE nUR R UR 5 U R XT5 XR ' MG g)z
Populate required identifiers. These are arguments without which
the resource cannot be used. Identifiers become arguments for
operations on the resource.
N)identifiersappendname_create_identifier)r r r r r!
identifiers r r. !ResourceFactory._load_identifiers sF )44J##JOO4%)%<%<&E//" 5r c UR ( a' U R UR UUSS9US' US US' UR H nU R UUUS9XR ' M" g)z
Actions on the resource become methods, with the ``load`` method
being a special case which sets internal data for attributes, and
``reload`` is an alias for ``load``.
T)action_modelr! r" is_loadloadreload)rD r! r" N)rF _create_actionactionsr? )r r r! r r" actions r r/ ResourceFactory._load_actions s| //+00+ / 0 E&M $FmE(O$,,F!%!4!4#+ / "5 "E++ -r c UR ( d gUR R UR 5 nUR Vs0 s H# nUR ( d M UR U_M% nnUR U5 n U R
5 H9 u n
u pX; a U R UX UUS9n
OU R UUU
UUS9n
XU
' M; gs snf )z
Load resource attributes based on the resource shape. The shape
name is referenced in the resource JSON, but the shape itself
is defined in the Botocore service JSON, hence the need for
access to the ``service_model``.
N)r! rA member_modelr" )r! r? snake_casedrM r" ) r* r+ r, r= member_nameget_attributesitems_create_identifier_alias_create_autoload_property)r r r r! r r" r* ir=
attributesr? orig_namememberprops r r0 ResourceFactory._load_attributes s ##--778L8LM $//
/}}
AMM1/
$2259
)3)9)9);%D%9"44"/*0!'$3 5 55"/" $!'$3 6 $K! *<
s CCc x UR H* nU R UR UUS9XR ' M, g)z
Load resource collections from the model. Each collection becomes
a :py:class:`~boto3.resources.collection.CollectionManager` instance
on the resource instance, which allows you to iterate and filter
through the collection's items.
)r! collection_modelr" N)collections_create_collectionr? )r r r r" r[ s r r1 !ResourceFactory._load_collections sC !/ : :+/+B+B,11!1 / ,C ,E''( !;r c UR H nU R UUUS9XR ' M" UR H nU R UUUS9XR ' M" U R XR 5 g)a
Load related resources, which are defined via a ``has``
relationship but conceptually come in two forms:
1. A reference, which is a related resource instance and can be
``None``, such as an EC2 instance's ``vpc``.
2. A subresource, which is a resource constructor that will always
return a resource instance which shares identifiers/data with
this resource, such as ``s3.Bucket('name').Object('key')``.
)reference_modelr! r" )subresource_modelr! r" N)
references_create_referencer? subresources_create_class_partial&_create_available_subresources_command)r r r! r r" referencesubresources r r2 #ResourceFactory._load_has_relations s (22I %)$:$: )+ / %; %E..! 3 *66K '+&@&@"-+ / 'A 'E""# 7
33..
r c r ^ U Vs/ s H o3R PM snm[ T5 mU4S jnXAS' g s snf )Nc > T$ )z
Returns a list of all the available sub-resources for this
Resource.
:returns: A list containing the name of each sub-resource for this
resource
:rtype: list of str
)factory_self
_subresourcess r get_available_subresourcesZResourceFactory._create_available_subresources_command.
.get_available_subresources s ! r ro )r? sorted)r r rd rh ro rn s @r rf 6ResourceFactory._create_available_subresources_command s<