o
    QDi                     @  sv   d dl mZ d dlmZmZmZ ddlmZ ddlmZ ddl	m
Z
 er*ddlmZ 	dddddddd	dddZdS )    )annotations)TYPE_CHECKINGAnyOptional   )FrictionlessException)platform)Resource)typesN)nametypefilterprocess
limit_rowsresource_namesourceOptional[Any]r   Optional[str]r   r   Optional[types.IFilterFunction]r    Optional[types.IProcessFunction]r   Optional[int]r   optionsr   c          
      K  s`   |p|}t | tr| n	t| fd|i|}t |tjjs'd|j d}	t|	|j||||dS )a  Extract rows

    Parameters:
        name: extract only resource having this name
        filter: row filter function
        process: row processor function
        limit_rows: limit amount of rows to this number

    Returns:
        extracted rows indexed by resource name
    datatypezResource with data type "z" is not extractable)r   r   r   r   )
isinstancer	   r   frictionless_resourcesExtractabler   r   extract)
r   r   r   r   r   r   r   r   resourcenote r   U/var/www/Datamplify/venv/lib/python3.10/site-packages/frictionless/actions/extract.pyr      s   r   )N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )
__future__r   typingr   r   r   	exceptionr   r   r   r	    r
   r   r   r   r   r    <module>   s     