LSEG Data Library for Python

retrieve

The retrieve function retrieves the FileDownloader object for further retrieval or extraction of files.

Module

lseg.data.delivery.cfs.file_downloader

Syntax

retrieve(session)

Parameters

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

Returned value

FileDownloader object.

The FileDownloader object is responsible for further downloading or extracting of files.
It has two methods that have similar syntax:

download(path)

extract(path)

where path is the location where the user wants to download or extract files.

Usage

The following example demonstrates how to download a specific file:

from lseg.data.delivery import cfs


definition = cfs.file_downloader.Definition(
    {
        "id": '47f2-6a49-d66f59d3-af41-87e767427ae2',
        "filename": 'Bulk-ESG-Global-Symbology-Cusip-v1-Init-2023-02-05T10:31:37.481Z.jsonl.gz' 
    }
).retrieve().download()

None.

83 words (0:26 mins)