Skip to content

Commit 90d4788

Browse files
committed
MOD: Make batch.submit_job start and end params required
1 parent 775f2ce commit 90d4788

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

databento/historical/api/batch.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ def __init__(self, key: str, gateway: str) -> None:
3333
def submit_job(
3434
self,
3535
dataset: Union[Dataset, str],
36+
start: Union[pd.Timestamp, date, str, int],
37+
end: Union[pd.Timestamp, date, str, int],
3638
schema: Union[Schema, str],
3739
symbols: Optional[Union[List[str], str]] = None,
38-
start: Optional[Union[pd.Timestamp, date, str, int]] = None,
39-
end: Optional[Union[pd.Timestamp, date, str, int]] = None,
4040
encoding: Union[Encoding, str] = "dbz",
4141
compression: Optional[Union[Compression, str]] = None,
4242
split_duration: Union[Duration, str] = "day",
@@ -56,20 +56,20 @@ def submit_job(
5656
----------
5757
dataset : Dataset or str
5858
The dataset code (string identifier) for the request.
59-
symbols : List[Union[str, int]] or str, optional
60-
The product symbols to filter for. Takes up to 2,000 symbols per request.
61-
If more than 1 symbol is specified, the data is merged and sorted by time.
62-
If `*` or ``None`` then will be for **all** symbols.
63-
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
64-
The data record schema for the request.
65-
start : pd.Timestamp or date or str or int, optional
59+
start : pd.Timestamp or date or str or int
6660
The start datetime of the request time range (inclusive).
6761
Assumes UTC as timezone unless passed a tz-aware object.
6862
If an integer is passed, then this represents nanoseconds since UNIX epoch.
69-
end : pd.Timestamp or date or str or int, optional
63+
end : pd.Timestamp or date or str or int
7064
The end datetime of the request time range (exclusive).
7165
Assumes UTC as timezone unless passed a tz-aware object.
7266
If an integer is passed, then this represents nanoseconds since UNIX epoch.
67+
symbols : List[Union[str, int]] or str, optional
68+
The product symbols to filter for. Takes up to 2,000 symbols per request.
69+
If more than 1 symbol is specified, the data is merged and sorted by time.
70+
If `*` or ``None`` then will be for **all** symbols.
71+
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
72+
The data record schema for the request.
7373
encoding : Encoding or str {'dbz', 'csv', 'json'}, default 'dbz'
7474
The data encoding.
7575
compression : Compression or str {'none', 'zstd'}, optional
@@ -163,7 +163,7 @@ def list_jobs(
163163
The batch job details.
164164
165165
"""
166-
params: List[Tuple[str, str]] = [
166+
params: List[Tuple[str, Optional[str]]] = [
167167
("states", maybe_values_list_to_string(states)),
168168
("since", maybe_datetime_to_string(since)),
169169
]

0 commit comments

Comments
 (0)