Ë
    	êñië  ã            
      ó®  — d dl mZ d dl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 d dlmZ d dlmZ  ej"                  e«      5  d d	lmZ ddd«       erd d
lmZ d dlmZ d dlmZ d dlmZ d dlmZ  e«       dddd dddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Z e«       dddd dddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Z y# 1 sw Y   Œ€xY w)é    )ÚannotationsN)ÚIOÚTYPE_CHECKINGÚLiteral)Úunstable)Úwrap_ldf)Úget_sources)Ú!_init_credential_provider_builder)ÚScanOptions)ÚPyLazyFrame)ÚPath)ÚStorageOptionsDict)Ú	DataFrame)ÚCredentialProviderFunction)Ú	LazyFrameÚlineTÚauto©ÚnameÚn_rowsÚrow_index_nameÚrow_index_offsetÚglobÚstorage_optionsÚcredential_providerÚinclude_file_pathsc               óF   — t        | ||||||||¬«	      j                  «       S )uh	  
    Read lines into a string column from a file.

    .. warning::
        This functionality is considered **unstable**. It may be changed
        at any point without it being considered a breaking change.

    Parameters
    ----------
    source
        Path(s) to a file or directory
        When needing to authenticate for scanning cloud locations, see the
        `storage_options` parameter.
    name
        Name to use for the output column.
    n_rows
        Stop reading from parquet file after reading `n_rows`.
    row_index_name
        If not None, this will insert a row index column with the given name into the
        DataFrame
    row_index_offset
        Offset to start the row index column (only used if the name is set)
    glob
        Expand path given via globbing rules.
    storage_options
        Options that indicate how to connect to a cloud provider.

        The cloud providers currently supported are AWS, GCP, and Azure.
        See supported keys here:

        * `aws <https://docs.rs/object_store/latest/object_store/aws/enum.AmazonS3ConfigKey.html>`_
        * `gcp <https://docs.rs/object_store/latest/object_store/gcp/enum.GoogleConfigKey.html>`_
        * `azure <https://docs.rs/object_store/latest/object_store/azure/enum.AzureConfigKey.html>`_
        * Hugging Face (`hf://`): Accepts an API key under the `token` parameter: \
          `{'token': '...'}`, or by setting the `HF_TOKEN` environment variable.

        If `storage_options` is not provided, Polars will try to infer the information
        from environment variables.
    credential_provider
        Provide a function that can be called to provide cloud storage
        credentials. The function is expected to return a dictionary of
        credential keys along with an optional credential expiry time.

        .. warning::
            This functionality is considered **unstable**. It may be changed
            at any point without it being considered a breaking change.
    include_file_paths
        Include the path of the source file(s) as a column with this name.

    See Also
    --------
    scan_lines

    Examples
    --------
    >>> pl.read_lines(b"Hello\nworld")
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”�
    â”‚ line  â”‚
    â”‚ ---   â”‚
    â”‚ str   â”‚
    â•žâ•�â•�â•�â•�â•�â•�â•�â•¡
    â”‚ Hello â”‚
    â”‚ world â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”˜
    r   )Ú
scan_linesÚcollect)	Úsourcer   r   r   r   r   r   r   r   s	            úQ/var/www/pod-logistic/pod-ai/venv/lib/python3.12/site-packages/polars/io/lines.pyÚ
read_linesr"      s6   € ôr ØØØØ%Ø)ØØ'Ø/Ø-ô
÷ �gƒið
ó    c               ó²   — t        | «      }	t        ||	|d«      }
~t        j                  |	t	        |�||fnd|�d|fnd||||
¬«      |¬«      }t        |«      S )u�	  
    Construct a LazyFrame which scans lines into a string column from a file.

    .. warning::
        This functionality is considered **unstable**. It may be changed
        at any point without it being considered a breaking change.

    Parameters
    ----------
    source
        Path(s) to a file or directory
        When needing to authenticate for scanning cloud locations, see the
        `storage_options` parameter.
    name
        Name to use for the output column.
    n_rows
        Stop reading from parquet file after reading `n_rows`.
    row_index_name
        If not None, this will insert a row index column with the given name into the
        DataFrame
    row_index_offset
        Offset to start the row index column (only used if the name is set)
    glob
        Expand path given via globbing rules.
    storage_options
        Options that indicate how to connect to a cloud provider.

        The cloud providers currently supported are AWS, GCP, and Azure.
        See supported keys here:

        * `aws <https://docs.rs/object_store/latest/object_store/aws/enum.AmazonS3ConfigKey.html>`_
        * `gcp <https://docs.rs/object_store/latest/object_store/gcp/enum.GoogleConfigKey.html>`_
        * `azure <https://docs.rs/object_store/latest/object_store/azure/enum.AzureConfigKey.html>`_
        * Hugging Face (`hf://`): Accepts an API key under the `token` parameter: \
          `{'token': '...'}`, or by setting the `HF_TOKEN` environment variable.

        If `storage_options` is not provided, Polars will try to infer the information
        from environment variables.
    credential_provider
        Provide a function that can be called to provide cloud storage
        credentials. The function is expected to return a dictionary of
        credential keys along with an optional credential expiry time.

        .. warning::
            This functionality is considered **unstable**. It may be changed
            at any point without it being considered a breaking change.
    include_file_paths
        Include the path of the source file(s) as a column with this name.

    See Also
    --------
    read_lines

    Examples
    --------
    >>> pl.scan_lines(b"Hello\nworld").collect()
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”�
    â”‚ line  â”‚
    â”‚ ---   â”‚
    â”‚ str   â”‚
    â•žâ•�â•�â•�â•�â•�â•�â•�â•¡
    â”‚ Hello â”‚
    â”‚ world â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”˜
    r   Nr   )Ú	row_indexÚ	pre_slicer   r   r   r   )ÚsourcesÚscan_optionsr   )r	   r
   r   Únew_from_scan_linesr   r   )r    r   r   r   r   r   r   r   r   r'   Úcredential_provider_builderÚpylfs               r!   r   r   €   s„   € ôr ˜&Ó!€Gä"CØ˜W o°|ó#Ðð 	ä×*Ñ*ØÜ ð "Ð-ð  Ð!1Ñ2àà%+Ð%7�q˜&‘k¸TØ1ØØ+Ø ;ô
ð ô€Dô" �D‹>Ðr#   )r    úcstr | Path | IO[str] | IO[bytes] | bytes | list[str] | list[Path] | list[IO[str]] | list[IO[bytes]]r   Ústrr   ú
int | Noner   ú
str | Noner   Úintr   Úboolr   úStorageOptionsDict | Noner   ú3CredentialProviderFunction | Literal['auto'] | Noner   r/   Úreturnr   )r    r,   r   r-   r   r.   r   r/   r   r0   r   r1   r   r2   r   r3   r   r/   r4   r   )!Ú
__future__r   Ú
contextlibÚtypingr   r   r   Úpolars._utils.unstabler   Úpolars._utils.wrapr   Úpolars.io._utilsr	   Ú,polars.io.cloud.credential_provider._builderr
   Úpolars.io.scan_options._optionsr   ÚsuppressÚImportErrorÚpolars._plrr   Úpathlibr   Úpolars._typingr   Úpolars.dataframe.framer   Úpolars.io.cloudr   Úpolars.lazyframe.framer   r"   r   © r#   r!   ú<module>rF      s¤  ðÝ "ã ß -Ñ -å +Ý 'Ý (õõ 8à€Z×Ñ˜Ó%ñ (Ý'÷(ñ Ýå1Ý0Ý:Ý0ñ 
ƒð ØØ!%ØØØ15ØOUØ%)ñ)bð	ðbð ðbð ðbð ðbð  ð!bð" ð#bð$ /ð%bð& Mð'bð( #ð)bð* ò+bó ðbñJ 
ƒð ØØ!%ØØØ15ØOUØ%)ñ)pð	ðpð ðpð ðpð ðpð  ð!pð" ð#pð$ /ð%pð& Mð'pð( #ð)pð* ò+pó ñp÷g(ð (ús   ÁCÃC