22
33import warnings
44from datetime import date
5- from io import BufferedIOBase , BytesIO
5+ from io import BufferedIOBase
6+ from io import BytesIO
67from os import PathLike
78from typing import List , Optional , Tuple , Union
89
910import pandas as pd
11+
1012from databento .common .dbnstore import DBNStore
1113from databento .common .deprecated import deprecated
12- from databento .common .enums import Compression , Dataset , Encoding , Schema , SType
14+ from databento .common .enums import Compression
15+ from databento .common .enums import Dataset
16+ from databento .common .enums import Encoding
17+ from databento .common .enums import Schema
18+ from databento .common .enums import SType
1319from databento .common .error import BentoWarning
14- from databento .common .parsing import (
15- datetime_to_string ,
16- optional_datetime_to_string ,
17- optional_symbols_list_to_string ,
18- )
19- from databento .common .validation import validate_enum , validate_semantic_string
20+ from databento .common .parsing import datetime_to_string
21+ from databento .common .parsing import optional_datetime_to_string
22+ from databento .common .parsing import optional_symbols_list_to_string
23+ from databento .common .validation import validate_enum
24+ from databento .common .validation import validate_semantic_string
2025from databento .historical .api import API_VERSION
2126from databento .historical .api .metadata import MetadataHttpAPI
2227from databento .historical .http import BentoHttpAPI
@@ -34,35 +39,6 @@ def __init__(self, key: str, gateway: str) -> None:
3439 super ().__init__ (key = key , gateway = gateway )
3540 self ._base_url = gateway + f"/v{ API_VERSION } /timeseries"
3641
37- @deprecated
38- def stream (
39- self ,
40- dataset : Union [Dataset , str ],
41- start : Union [pd .Timestamp , date , str , int ],
42- end : Optional [Union [pd .Timestamp , date , str , int ]] = None ,
43- symbols : Optional [Union [List [str ], str ]] = None ,
44- schema : Union [Schema , str ] = "trades" ,
45- stype_in : Union [SType , str ] = "raw_symbol" ,
46- stype_out : Union [SType , str ] = "instrument_id" ,
47- limit : Optional [int ] = None ,
48- path : Optional [Union [PathLike [str ], str ]] = None ,
49- ) -> DBNStore :
50- """
51- The `.stream` method is deprecated and will be removed in a future version.
52- The method has been renamed to `.get_range`, which you can now use.
53- """
54- return self .get_range (
55- dataset = dataset ,
56- start = start ,
57- end = end ,
58- symbols = symbols ,
59- schema = schema ,
60- stype_in = stype_in ,
61- stype_out = stype_out ,
62- limit = limit ,
63- path = path ,
64- )
65-
6642 def get_range (
6743 self ,
6844 dataset : Union [Dataset , str ],
0 commit comments