77from typing import List , Optional , Tuple , Union
88
99import pandas as pd
10- from databento .common .bento import Bento
10+ from databento .common .dbnstore import DBNStore
1111from databento .common .deprecated import deprecated
1212from databento .common .enums import Compression , Dataset , Encoding , Schema , SType
1313from databento .common .parsing import datetime_to_string , optional_symbols_list_to_string
@@ -38,7 +38,7 @@ def stream(
3838 stype_out : Union [SType , str ] = "product_id" ,
3939 limit : Optional [int ] = None ,
4040 path : Optional [Union [PathLike [str ], str ]] = None ,
41- ) -> Bento :
41+ ) -> DBNStore :
4242 """
4343 The `.stream` method is deprecated and will be removed in a future version.
4444 The method has been renamed to `.get_range`, which you can now use.
@@ -66,7 +66,7 @@ def get_range(
6666 stype_out : Union [SType , str ] = "product_id" ,
6767 limit : Optional [int ] = None ,
6868 path : Optional [Union [PathLike [str ], str ]] = None ,
69- ) -> Bento :
69+ ) -> DBNStore :
7070 """
7171 Request a historical time series data stream from Databento.
7272
@@ -101,11 +101,11 @@ def get_range(
101101 limit : int, optional
102102 The maximum number of records to return. If `None` then no limit.
103103 path : PathLike or str, optional
104- The path to stream the data to on disk (will then return a `Bento `).
104+ The path to stream the data to on disk (will then return a `DBNStore `).
105105
106106 Returns
107107 -------
108- Bento
108+ DBNStore
109109
110110 Notes
111111 -----
@@ -157,9 +157,9 @@ def get_range(
157157
158158 if path is not None :
159159 writer .close ()
160- return Bento .from_file (path )
160+ return DBNStore .from_file (path )
161161 writer .seek (0 ) # rewind for read
162- return Bento .from_bytes (writer .read ())
162+ return DBNStore .from_bytes (writer .read ())
163163
164164 @deprecated
165165 async def stream_async (
@@ -173,7 +173,7 @@ async def stream_async(
173173 stype_out : Union [SType , str ] = "product_id" ,
174174 limit : Optional [int ] = None ,
175175 path : Optional [Union [PathLike [str ], str ]] = None ,
176- ) -> Bento :
176+ ) -> DBNStore :
177177 """
178178 The `.stream_async` method is deprecated and will be removed in a future
179179 version.
@@ -202,7 +202,7 @@ async def get_range_async(
202202 stype_out : Union [SType , str ] = "product_id" ,
203203 limit : Optional [int ] = None ,
204204 path : Optional [Union [PathLike [str ], str ]] = None ,
205- ) -> Bento :
205+ ) -> DBNStore :
206206 """
207207 Asynchronously request a historical time series data stream from Databento.
208208
@@ -237,11 +237,11 @@ async def get_range_async(
237237 limit : int, optional
238238 The maximum number of records to return. If `None` then no limit.
239239 path : PathLike or str, optional
240- The path to stream the data to on disk (will then return a `Bento `).
240+ The path to stream the data to on disk (will then return a `DBNStore `).
241241
242242 Returns
243243 -------
244- Bento
244+ DBNStore
245245
246246 Notes
247247 -----
@@ -292,9 +292,9 @@ async def get_range_async(
292292
293293 if path is not None :
294294 writer .close ()
295- return Bento .from_file (path )
295+ return DBNStore .from_file (path )
296296 writer .seek (0 ) # rewind for read
297- return Bento .from_bytes (writer .read ())
297+ return DBNStore .from_bytes (writer .read ())
298298
299299 def _pre_check_data_size ( # noqa (prefer not to make static)
300300 self ,
0 commit comments