55from databento .common .enums import Dataset , Encoding , FeedMode , Schema , SType
66from databento .common .parsing import (
77 enum_or_str_uppercase ,
8- maybe_date_to_string ,
9- maybe_datetime_to_string ,
10- maybe_enum_or_str_lowercase ,
11- maybe_symbols_list_to_string ,
8+ optional_date_to_string ,
9+ optional_datetime_to_string ,
10+ optional_enum_or_str_lowercase ,
11+ optional_symbols_list_to_string ,
1212)
1313from databento .common .validation import validate_enum , validate_maybe_enum
1414from databento .historical .api import API_VERSION
@@ -70,8 +70,8 @@ def list_datasets(
7070
7171 """
7272 params : List [Tuple [str , Optional [str ]]] = [
73- ("start_date" , maybe_date_to_string (start_date )),
74- ("end_date" , maybe_date_to_string (end_date )),
73+ ("start_date" , optional_date_to_string (start_date )),
74+ ("end_date" , optional_date_to_string (end_date )),
7575 ]
7676
7777 response : Response = self ._get (
@@ -108,8 +108,8 @@ def list_schemas(
108108 """
109109 params : List [Tuple [str , Optional [str ]]] = [
110110 ("dataset" , enum_or_str_uppercase (dataset , "dataset" )),
111- ("start_date" , maybe_date_to_string (start_date )),
112- ("end_date" , maybe_date_to_string (end_date )),
111+ ("start_date" , optional_date_to_string (start_date )),
112+ ("end_date" , optional_date_to_string (end_date )),
113113 ]
114114
115115 response : Response = self ._get (
@@ -153,8 +153,8 @@ def list_fields(
153153
154154 params : List [Tuple [str , str ]] = [
155155 ("dataset" , enum_or_str_uppercase (dataset , "dataset" )),
156- ("schema" , maybe_enum_or_str_lowercase (schema , "schema" )),
157- ("encoding" , maybe_enum_or_str_lowercase (encoding , "encoding" )),
156+ ("schema" , optional_enum_or_str_lowercase (schema , "schema" )),
157+ ("encoding" , optional_enum_or_str_lowercase (encoding , "encoding" )),
158158 ]
159159
160160 response : Response = self ._get (
@@ -230,8 +230,8 @@ def list_unit_prices(
230230
231231 params : List [Tuple [str , Optional [str ]]] = [
232232 ("dataset" , enum_or_str_uppercase (dataset , "dataset" )),
233- ("mode" , maybe_enum_or_str_lowercase (mode , "mode" )),
234- ("schema" , maybe_enum_or_str_lowercase (schema , "schema" )),
233+ ("mode" , optional_enum_or_str_lowercase (mode , "mode" )),
234+ ("schema" , optional_enum_or_str_lowercase (schema , "schema" )),
235235 ]
236236
237237 response : Response = self ._get (
@@ -308,7 +308,7 @@ def get_record_count(
308308 If an integer is passed, then this represents nanoseconds since UNIX epoch.
309309 symbols : List[Union[str, int]] or str, optional
310310 The product symbols to filter for. Takes up to 2,000 symbols per request.
311- If `*` or ``None`` then will be for **all** symbols.
311+ If 'ALL_SYMBOLS' or ``None`` then will be for **all** symbols.
312312 schema : Schema or str {'mbo', 'mbp-1', 'mbp-10', 'trades', 'tbbo', 'ohlcv-1s', 'ohlcv-1m', 'ohlcv-1h', 'ohlcv-1d', 'definition', 'statistics', 'status'}, default 'trades' # noqa
313313 The data record schema for the request.
314314 stype_in : SType or str, default 'native'
@@ -328,10 +328,10 @@ def get_record_count(
328328
329329 params : List [Tuple [str , Optional [str ]]] = [
330330 ("dataset" , enum_or_str_uppercase (dataset , "dataset" )),
331- ("symbols" , maybe_symbols_list_to_string (symbols , SType (stype_in ))),
331+ ("symbols" , optional_symbols_list_to_string (symbols , SType (stype_in ))),
332332 ("schema" , Schema (schema ).value ),
333- ("start" , maybe_datetime_to_string (start )),
334- ("end" , maybe_datetime_to_string (end )),
333+ ("start" , optional_datetime_to_string (start )),
334+ ("end" , optional_datetime_to_string (end )),
335335 ("stype_in" , SType (stype_in ).value ),
336336 ]
337337 if limit is not None :
@@ -373,7 +373,7 @@ def get_billable_size(
373373 If an integer is passed, then this represents nanoseconds since UNIX epoch.
374374 symbols : List[Union[str, int]] or str, optional
375375 The product symbols to filter for. Takes up to 2,000 symbols per request.
376- If `*` or ``None`` then will be for **all** symbols.
376+ If 'ALL_SYMBOLS' or ``None`` then will be for **all** symbols.
377377 schema : Schema or str {'mbo', 'mbp-1', 'mbp-10', 'trades', 'tbbo', 'ohlcv-1s', 'ohlcv-1m', 'ohlcv-1h', 'ohlcv-1d', 'definition', 'statistics', 'status'}, default 'trades' # noqa
378378 The data record schema for the request.
379379 stype_in : SType or str, default 'native'
@@ -439,7 +439,7 @@ def get_cost(
439439 The data feed mode for the request.
440440 symbols : List[Union[str, int]] or str, optional
441441 The product symbols to filter for. Takes up to 2,000 symbols per request.
442- If `*` or ``None`` then will be for **all** symbols.
442+ If 'ALL_SYMBOLS' or ``None`` then will be for **all** symbols.
443443 schema : Schema or str {'mbo', 'mbp-1', 'mbp-10', 'trades', 'tbbo', 'ohlcv-1s', 'ohlcv-1m', 'ohlcv-1h', 'ohlcv-1d', 'definition', 'statistics', 'status'}, default 'trades' # noqa
444444 The data record schema for the request.
445445 stype_in : SType or str, default 'native'
0 commit comments