o
    ‹¨Êh&  ã                   @   sR   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	m
Z
 G dd„ deeƒZd	S )
zÙ
    pyexcel.plugins.sources.pydata.arraysource
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Representation of array source

    :copyright: (c) 2015-2017 by Onni Software Ltd.
    :license: New BSD License
é    )ÚAbstractSourceÚMemorySourceMixin)ÚDEFAULT_SHEET_NAME)Úparamsé   )ÚArrayReaderÚ_FakeIOc                   @   s4   e Zd ZdZefdd„Zdd„ Zdd„ Zdd	„ Zd
S )ÚArraySourcez1
    A two dimensional array as sheet source
    c                 K   s*   || _ tƒ | _|| _tj| fi |¤Ž d S ©N)Ú_ArraySource__arrayr   Ú_contentÚ_ArraySource__sheet_namer   Ú__init__)ÚselfÚarrayÚ
sheet_nameÚkeywords© r   ú\/var/www/html/env/lib/python3.10/site-packages/pyexcel/plugins/sources/pydata/arraysource.pyr      s   zArraySource.__init__c                 C   s"   t | jfi | j¤Ž}| j| ¡ iS r
   )r   r   Ú	_keywordsr   Úto_array)r   Úarray_readerr   r   r   Úget_data   s   zArraySource.get_datac                 C   s
   t jd fS r
   )r   ÚARRAY)r   r   r   r   Úget_source_info   s   
zArraySource.get_source_infoc                 C   s   | j  | ¡ ¡ d S r
   )r   Úsetvaluer   )r   Úsheetr   r   r   Ú
write_data"   s   zArraySource.write_dataN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r   r	      s    r	   N)r!   Úpyexcel.sourcer   r   Úpyexcel.constantsr   Úpyexcel.plugins.sourcesr   Úcommonr   r   r	   r   r   r   r   Ú<module>   s    	