HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/boto/__pycache__/plugin.cpython-310.pyc
o

we�
�@sNdZddlZddlZddlZGdd�de�Zddd�Zdd�Zd	a	d
d�Z
dS)
a
Implements plugin related api.

To define a new plugin just subclass Plugin, like this.

class AuthPlugin(Plugin):
    pass

Then start creating subclasses of your new plugin.

class MyFancyAuth(AuthPlugin):
    capability = ['sign', 'vmac']

The actual interface is duck typed.
�Nc@s eZdZdZgZedd��ZdS)�PluginzBase class for all plugins.cCs|D]
}||jvrdSqdS)zMReturns true if the requested capability is supported by this plugin
        FT)�
capability)�cls�requested_capability�c�r�D/home/arjun/projects/env/lib/python3.10/site-packages/boto/plugin.py�
is_capable1s

�zPlugin.is_capableN)�__name__�
__module__�__qualname__�__doc__r�classmethodr	rrrrr,s
rcCs2|sg}g}|��D]}|�|�r|�|�q
|S�N)�__subclasses__r	�append)rr�result�handlerrrr�
get_plugin;s

�rcCsftj�|�\}}tj�|�\}}t�||g�\}}}zt�||||�W|r*|��SS|r2|��wwr)�os�path�split�splitext�imp�find_module�load_module�close)�filenamer�name�ext�file�datarrr�_import_moduleEs
�
�r"FcCsNtrdSda|�dd�sdS|�dd�}t�tj�|d��D]}t|�qdS)NTr�plugin_directoryz*.py)�_plugin_loaded�
has_option�get�globrr�joinr")�config�	directoryr rrr�load_pluginsSs
�r+r)r
r'r�os.pathr�objectrrr"r$r+rrrr�<module>s