LSEG Data Library for Python

get_data

The get_data function sends a request to the Client File Store (CFS) to retrieve a file from a specific file set, described in the cfs.files.Definition object.

Module

lseg.data.delivery.cfs.files

Syntax

get_data(session)

Parameters

Value Description Data type Optional Default value
session Session object. If it's not passed the default session will be used. Session object Yes None

Returned value

Response

Usage

The following example demonstrates how to retrieve file data using a specified file set ID:

response = cfs.files.Definition(fileset_id='400a-a458-106d24dc-b0ea-fb8baf45d631')

print(response.data.df.to_string())

This example produces the following output:

Response
                                 id                             filesetId                                                                                                                                                                                  storageLocation                                                                   filename                                                                                       href              modified  fileSizeInBytes                               md5               created

0 47f2-6a49-d66f59d3-af41-87e767427ae2 400a-a458-106d24dc-b0ea-fb8baf45d631 {'url': 'https://a206464-bulk-esg.s3.amazonaws.com/Bulk-ESG-Global-Symbology-Cusip-v1/2023/02/05/Bulk-ESG-Global-Symbology-Cusip-v1-Init-2023-02-05T10%3A31%3A37.481Z.jsonl.gz', '@type': 's3'} Bulk-ESG-Global-Symbology-Cusip-v1-Init-2023-02-05T10:31:37.481Z.jsonl.gz https://api.refinitiv.com/file-store/v1/files/47f2-6a49-d66f59d3-af41-87e767427ae2/stream 2023-02-05T10:33:12Z 1254624 29c97425c973cbfe5b56d713826e8133 2023-02-05T10:33:12Z

None.

84 words (0:27 mins)