o
    ‹¨Êh€  ã                   @   s:   d Z ddlm  mZ G dd„ deƒZG dd„ deƒZdS )z¿
    pyexcel.parser
    ~~~~~~~~~~~~~~~~~~~

    Extract tabular data from external file, stream or content

    :copyright: (c) 2015-2017 by Onni Software Ltd.
    :license: New BSD License
é    Nc                   @   s8   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
d„ ZdS )ÚAbstractParserz;
    Parsing data from tabular data such as excel file
    c                 C   s
   || _ d S ©N)Ú
_file_type)ÚselfÚ	file_type© r   ú@/var/www/html/env/lib/python3.10/site-packages/pyexcel/parser.pyÚ__init__   s   
zAbstractParser.__init__c                 K   ó   t dƒ‚)z1
        Parse data from a physical file
        zparse_file is not implemented©ÚNotImplementedError©r   Ú	file_nameÚkeywordsr   r   r   Ú
parse_file   ó   zAbstractParser.parse_filec                 K   r
   )z/
        Parse data from a file stream
        z$parse_file_stream is not implementedr   ©r   Úfile_streamr   r   r   r   Úparse_file_stream   r   z AbstractParser.parse_file_streamc                 K   r
   )z6
        Parse data from a given file content
        z%parse_file_content is not implementedr   ©r   Úfile_contentr   r   r   r   Úparse_file_content!   r   z!AbstractParser.parse_file_contentc                 C   s   t  |¡ d S r   )ÚgcÚappend)r   Úreaderr   r   r   Ú_free_me_up_later'   s   z AbstractParser._free_me_up_laterN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   r   r   r   r   r   r   r   r   r      s    r   c                   @   s0   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
S )ÚDbParserz(
    Change interface for db parser
    c                 K   r
   )Nzparse_file is not supported©Ú	Exceptionr   r   r   r   r   0   ó   zDbParser.parse_filec                 K   s   | j |fi |¤ŽS r   )Úparse_dbr   r   r   r   r   3   s   zDbParser.parse_file_streamc                 K   r
   )Nz#parse_file_content is not supportedr!   r   r   r   r   r   6   r#   zDbParser.parse_file_contentc                 K   r
   )z*
        Parse data from database
        zparse_db is not implementedr   )r   Úargumentr   r   r   r   r$   9   r   zDbParser.parse_dbN)r   r   r   r   r   r   r   r$   r   r   r   r   r    +   s    r    )r   Ú!pyexcel.internal.garbagecollectorÚinternalÚgarbagecollectorr   Úobjectr   r    r   r   r   r   Ú<module>   s    	