Skip to content

Commit 5aebd59

Browse files
committed
DOC: Add more Bento helper method docs
1 parent f04fa9b commit 5aebd59

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

databento/common/bento.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def to_json(self, path: str) -> None:
576576
"""
577577
self.to_df().to_json(path, orient="records", lines=True)
578578

579-
def request_symbology(self, client) -> Dict[str, Dict[str, Any]]:
579+
def request_symbology(self, client) -> Dict[str, Any]:
580580
"""
581581
Request symbology resolution based on the metadata properties.
582582
@@ -592,8 +592,9 @@ def request_symbology(self, client) -> Dict[str, Dict[str, Any]]:
592592
593593
Returns
594594
-------
595-
Dict[str, Dict[str, Any]]
596-
A map of input symbol to output symbol across the date range.
595+
Dict[str, Any]
596+
A result including a map of input symbol to output symbol across a
597+
date range.
597598
598599
"""
599600
return client.symbology.resolve(
@@ -618,9 +619,9 @@ def request_full_definitions(
618619
Parameters
619620
----------
620621
client : Historical
621-
The historical client to use for the request.
622+
The historical client to use for the request (contains the API key).
622623
path : str, optional
623-
The file path to write to on disk (if provided).
624+
The path to stream the data to on disk (will then return a `FileBento`).
624625
625626
Returns
626627
-------

databento/historical/api/symbology.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from datetime import date
2-
from typing import List, Optional, Tuple, Union
2+
from typing import Any, Dict, List, Optional, Tuple, Union
33

44
import pandas as pd
55
from databento.common.enums import SType
@@ -27,7 +27,7 @@ def resolve(
2727
start_date: Union[date, str],
2828
end_date: Union[date, str],
2929
default_value: Optional[str] = "",
30-
):
30+
) -> Dict[str, Any]:
3131
"""
3232
Request symbology mappings resolution from Databento.
3333
@@ -53,8 +53,9 @@ def resolve(
5353
5454
Returns
5555
-------
56-
Dict[str, Dict[str, Any]]
57-
A map of input symbol to output symbol across the date range.
56+
Dict[str, Any]
57+
A result including a map of input symbol to output symbol across a
58+
date range.
5859
5960
"""
6061
dataset = enum_or_str_lowercase(dataset, "dataset")

databento/historical/api/timeseries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def stream(
5959
limit : int, optional
6060
The maximum number of records to return. If ``None`` then no limit.
6161
path : str, optional
62-
The file path to write to on disk (if provided).
62+
The path to stream the data to on disk (will then return a `FileBento`).
6363
6464
Returns
6565
-------
@@ -155,7 +155,7 @@ async def stream_async(
155155
limit : int, optional
156156
The maximum number of records to return. If ``None`` then no limit.
157157
path : str, optional
158-
The file path to write to on disk (if provided).
158+
The path to stream the data to on disk (will then return a `FileBento`).
159159
160160
Returns
161161
-------

0 commit comments

Comments
 (0)