Skip to content

LeanDataPathComponents

QuantConnect.Util.LeanDataPathComponents

LeanDataPathComponents(
    security_type: SecurityType,
    market: str,
    resolution: Resolution,
    symbol: Union[Symbol, str, BaseContract],
    filename: str,
    date: Union[datetime, date],
    tick_type: TickType,
)

Bases: Object

Type representing the various pieces of information emebedded into a lean data file path

Initializes a new instance of the LeanDataPathComponents class

date

date: datetime

Gets the date component from the file name

security_type

security_type: SecurityType

Gets the security type from the path

market

market: str

Gets the market from the path

resolution

resolution: Resolution

Gets the resolution from the path

filename

filename: str

Gets the file name, not inluding directory information

symbol

symbol: Symbol

Gets the symbol object implied by the path. For options, or any multi-entry zip file, this should be the canonical symbol

tick_type

tick_type: TickType

Gets the tick type from the file name

parse

parse(path: str) -> LeanDataPathComponents

Parses the specified path into a new instance of the LeanDataPathComponents class

Parameters:

Name Type Description Default
path str

The path to be parsed

required

Returns:

Type Description
LeanDataPathComponents

A new instance of the LeanDataPathComponents class representing the specified path.