LocalFileSubscriptionStreamReader
QuantConnect.Lean.Engine.DataFeeds.Transport.LocalFileSubscriptionStreamReader
LocalFileSubscriptionStreamReader(
zip_file: Any, entry_name: str = None
)
LocalFileSubscriptionStreamReader(
data_cache_provider: IDataCacheProvider,
source: str,
entry_name: str = None,
)
LocalFileSubscriptionStreamReader(
data_cache_provider: IDataCacheProvider,
source: str,
starting_position: int,
)
Bases: Object, IStreamReader
Represents a stream reader capable of reading lines from disk
Initializes a new instance of the LocalFileSubscriptionStreamReader class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
zip_file
|
Optional[Any]
|
The local zip archive to be read |
None
|
entry_name
|
Optional[str]
|
Specifies the zip entry to be opened. Leave null if not applicable, |
None
|
data_cache_provider
|
Optional[IDataCacheProvider]
|
The IDataCacheProvider used to retrieve a stream of data |
None
|
source
|
Optional[str]
|
The local file to be read |
None
|
starting_position
|
Optional[int]
|
The position in the stream from which to start reading |
None
|
should_be_rate_limited
should_be_rate_limited: bool
Gets whether or not this stream reader should be rate limited
stream_reader
stream_reader: StreamReader
Direct access to the StreamReader instance
entry_file_names
entry_file_names: Iterable[str]
Returns the list of zip entries if local file stream reader is reading zip archive
transport_medium
transport_medium: SubscriptionTransportMedium
Gets SubscriptionTransportMedium.LOCAL_FILE
end_of_stream
end_of_stream: bool
Gets whether or not there's more data to be read in the stream
dispose
dispose() -> None
Disposes of the stream
read_line
read_line() -> str
Gets the next line/batch of content from the stream