o
    QDi                      @   sb   d dl Zd dlZd dlmZ d dlmZ d dlmZm	Z	m
Z
 defddZG dd	 d	Ze Z dS )
    N)cached_property)import_module)AnyCallableClassVarnamec                    s   dt dtf f fdd}|S )zExtra dependency decoratorfunc.c                    s   dt dt f fdd}|S )Nargskwargsc                     s>   z | i |W S  t y   td}d d}||w )Nzfrictionless.exceptionzPlease install "frictionless[z]")	Exceptionr   FrictionlessException)r	   r
   modulenote)r   r    N/var/www/Datamplify/venv/lib/python3.10/site-packages/frictionless/platform.pyinner   s   
z$extras.<locals>.outer.<locals>.inner)r   )r   r   r   )r   r   outer   s   zextras.<locals>.outer)r   r   )r   r   r   r   r   extras   s   r   c                   @   s   e Zd ZU dZe  Zee	 e
d< 	 ejj dejj Zee	 e
d< 	 edd Zedd Zed	d
 Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd  Zed!d" Zed#d$ Z ed%d& Z!ed'd( Z"ed)d* Z#ed+d, Z$ed-d. Z%ed/d0 Z&ed1d2 Z'ed3d4 Z(ed5d6 Z)ed7d8 Z*ed9d: Z+ed;d< Z,ed=d> Z-ed?d@ Z.ee/dAdBdCdD Z0ee/dEdBdFdG Z1ee/dEdBdHdI Z2ee/dJdBdKdL Z3ee/dJdBdMdN Z4ee/dJdBdOdP Z5ee/dJdBdQdR Z6ee/dSdBdTdU Z7ee/dSdBdVdW Z8ee/dXdBdYdZ Z9ee/d[dBd\d] Z:ee/d^dBd_d` Z;ee/dadBdbdc Z<ee/dddBdedf Z=ee/dgdBdhdi Z>ee/dgdBdjdk Z?ee/dgdBdldm Z@ee/dndBdodp ZAee/dqdBdrds ZBee/dtdBdudv ZCee/dtdBdwdx ZDee/dtdBdydz ZEee/dtdBd{d| ZFee/dtdBd}d~ ZGee/dtdBdd ZHee/ddBdd ZIee/ddBdd ZJee/ddBdd ZKdS )PlatformzPlatform representationtype.pythonc                 C      dd l }|S Nr   )bz2)selfr   r   r   r   r   )      zPlatform.bz2c                 C   r   r   )chardet)r   r   r   r   r   r   /   r   zPlatform.chardetc                 C      dd l }|jS r   )dateutil.parserparser)r   dateutilr   r   r   dateutil_parser5      zPlatform.dateutil_parserc                 C   r   r   )frictionlessr   r%   r   r   r   r%   ;   r   zPlatform.frictionlessc                 C   r   r   )frictionless.checkschecksr&   r   r   r   frictionless_checksA   r$   zPlatform.frictionless_checksc                 C   r   r   )frictionless.errorserrorsr&   r   r   r   frictionless_errorsG   r$   zPlatform.frictionless_errorsc                 C   r   r   )frictionless.fieldsfieldsr&   r   r   r   frictionless_fieldsM   r$   zPlatform.frictionless_fieldsc                 C   r   r   )frictionless.formatsformatsr&   r   r   r   frictionless_formatsS   r$   zPlatform.frictionless_formatsc                 C   r   r   )frictionless.portalsportalsr&   r   r   r   frictionless_portalsY   r$   zPlatform.frictionless_portalsc                 C   r   r   )frictionless.resources	resourcesr&   r   r   r   frictionless_resources_   r$   zPlatform.frictionless_resourcesc                 C   r   r   )frictionless.schemesschemesr&   r   r   r   frictionless_schemese   r$   zPlatform.frictionless_schemesc                 C   r   r   )frictionless.stepsstepsr&   r   r   r   frictionless_stepsk   r$   zPlatform.frictionless_stepsc                 C   r   r   )gzip)r   r?   r   r   r   r?   q   r   zPlatform.gzipc                 C   r   r   )html.parserr!   )r   htmlr   r   r   html_parserw   r$   zPlatform.html_parserc                 C   r   r   )isodate)r   rC   r   r   r   rC   }   r   zPlatform.isodatec                 C   r   r   )jinja2r   rD   r   r   r   rD      r   zPlatform.jinja2c                 C   r   r   )jinja2.filtersfiltersrE   r   r   r   jinja2_filters   r$   zPlatform.jinja2_filtersc                 C   r   r   )
jsonschemar   rI   r   r   r   rI      r   zPlatform.jsonschemac                 C   r   r   )jsonschema.validators
validatorsrJ   r   r   r   jsonschema_validators   r$   zPlatform.jsonschema_validatorsc                 C   r   r   )lzma)r   rN   r   r   r   rN      r   zPlatform.lzmac                 C   r   r   )markor   rO   r   r   r   rO      r   zPlatform.markoc                 C      dd l }|jjS r   )marko.ext.gfmextgfmrP   r   r   r   marko_ext_gfm   s   zPlatform.marko_ext_gfmc                 C   r   r   )petl)r   rV   r   r   r   rV      r   zPlatform.petlc                 C   r   r   )psycopg)r   rW   r   r   r   rW      r   zPlatform.psycopgc                 C   r   r   )requestsr   rX   r   r   r   rX      r   zPlatform.requestsc                 C   r   r   )requests.utilsutilsrY   r   r   r   requests_utils   r$   zPlatform.requests_utilsc                 C   r   r   )rfc3986)r   r]   r   r   r   r]      r   zPlatform.rfc3986c                 C   r   r   )rL   )r   rL   r   r   r   rL      r   zPlatform.validatorsc                 C   r   r   )yaml)r   r^   r   r   r   r^      r   zPlatform.yamlc                 C   r   r   )zipfile)r   r_   r   r   r   r_      r   zPlatform.zipfileawsr   c                 C   r   r   )boto3)r   ra   r   r   r   ra         zPlatform.boto3ckanc                 C   r   r   )-frictionless_ckan_mapper.ckan_to_frictionlessckan_to_frictionlessr   frictionless_ckan_mapperr   r   r   -frictionless_ckan_mapper_ckan_to_frictionless      z6Platform.frictionless_ckan_mapper_ckan_to_frictionlessc                 C   r   r   )-frictionless_ckan_mapper.frictionless_to_ckanfrictionless_to_ckanrf   r   r   r   -frictionless_ckan_mapper_frictionless_to_ckan   ri   z6Platform.frictionless_ckan_mapper_frictionless_to_ckanexcelc                 C   r   r   )xlrd)r   rn   r   r   r   rn      rb   zPlatform.xlrdc                 C   r   r   )xlwt)r   ro   r   r   r   ro      rb   zPlatform.xlwtc                 C   r   r   )openpyxl)r   rp   r   r   r   rp     rb   zPlatform.openpyxlc                 C   r   r   )tableschema_to_template)r   rq   r   r   r   rq   	  rb   z Platform.tableschema_to_templatejsonc                 C   r   r   )ijson)r   rs   r   r   r   rs     rb   zPlatform.ijsonc                 C   r   r   )	jsonlines)r   rt   r   r   r   rt     rb   zPlatform.jsonlinesgithubc                 C   r   r   )ru   )r   ru   r   r   r   ru     rb   zPlatform.githubgsheetsc                 C   r   r   )	pygsheets)r   rw   r   r   r   rw   %  rb   zPlatform.pygsheetsrA   c                 C   r   r   )pyquery)r   rx   r   r   r   rx   ,  rb   zPlatform.pyqueryodsc                 C   r   r   )ezodf)r   rz   r   r   r   rz   3  rb   zPlatform.ezodfmarkdownc                 C   r   r   )livemark)r   r|   r   r   r   r|   :  rb   zPlatform.livemarkpandasc                 C   r   r   )r}   r   r}   r   r   r   r}   A  rb   zPlatform.pandasc                 C   s   dd l }|jjjS r   )pandas.core.dtypes.apicoredtypesapir~   r   r   r   pandas_core_dtypes_apiH  s   
zPlatform.pandas_core_dtypes_apic                 C   r   r   )numpy)r   r   r   r   r   r   O  rb   zPlatform.numpyparquetc                 C   r   r   )fastparquet)r   r   r   r   r   r   V  rb   zPlatform.fastparquetspssc                 C   r   r   )savReaderWriter)r   r   r   r   r   sav_reader_writer]  rb   zPlatform.sav_reader_writersqlc                 C   r   r   )
sqlalchemyr   r   r   r   r   r   d  rb   zPlatform.sqlalchemyc                 C   r   r   )sqlalchemy.excexcr   r   r   r   sqlalchemy_exck  ri   zPlatform.sqlalchemy_excc                 C   r   r   )sqlalchemy.schemaschemar   r   r   r   sqlalchemy_schemar  ri   zPlatform.sqlalchemy_schemac                 C   r   r   )sqlalchemy.dialectsdialectsr   r   r   r   sqlalchemy_dialectsy  ri   zPlatform.sqlalchemy_dialectsc                 C   rQ   r   )sqlalchemy.dialects.postgresqlr   
postgresqlr   r   r   r   sqlalchemy_dialects_postgresql     z'Platform.sqlalchemy_dialects_postgresqlc                 C   rQ   r   )sqlalchemy.dialects.mysqlr   mysqlr   r   r   r   sqlalchemy_dialects_mysql  r   z"Platform.sqlalchemy_dialects_mysqlzenodoc                 C   r   r   )	pyzenodo3r   r   r   r   r   r     rb   zPlatform.pyzenodo3c                 C   r   r   )pyzenodo3.uploaduploadr   r   r   r   pyzenodo3_upload  ri   zPlatform.pyzenodo3_uploadwktc                 C   rQ   r   )frictionless.vendors.wktvendorsr   r&   r   r   r   r     r   zPlatform.wktN)L__name__
__module____qualname____doc__python_platformsystemlowerr   r   str__annotations__sysversion_infomajorminorr   r   r   r   r#   r%   r)   r,   r/   r2   r5   r8   r;   r>   r?   rB   rC   rD   rH   rI   rM   rN   rO   rU   rV   rW   rX   r\   r]   rL   r^   r_   r   ra   rh   rl   rn   ro   rp   rq   rs   rt   ru   rw   rx   rz   r|   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      s,  
 "





























r   )platformr   r   	functoolsr   	importlibr   typingr   r   r   r   r   r   r   r   r   r   <module>   s       
