o
    QDi                     @   s   d dl mZmZmZmZ ddlmZ ddlmZ ddl	m
Z
mZ ddlmZ ddlmZ 	ddddd	d
ee dee deee
ef  deee  def
ddZdS )    )AnyListOptionalUnion   )FrictionlessException)Package)PipelineStep)platform)ResourceN)typepipelinestepssourcer   r   r   optionsc                K   s   t |trt|}n	|st|pg d}t | tr| |S t | tr%| n	t| fd|i|}t |tjj	sAd|j
 d}t|||S )a  Transform resource

    Parameters:
        source: data source
        type: data type - package, resource or pipeline (default: infer)
        steps: transform steps
        **options: options for the underlaying constructor

    Returns:
        the transform result
    )r   datatypezResource with data type "z" is not transformable)
isinstancestrr	   from_descriptorr   	transformr   r   frictionless_resourcesTransformabler   r   )r   r   r   r   r   resourcenote r   W/var/www/Datamplify/venv/lib/python3.10/site-packages/frictionless/actions/transform.pyr   
   s   



r   )N)typingr   r   r   r   	exceptionr   packager   r   r	   r
   r   r   r   r   r   r   r   r   r   <module>   s,    
