Skip to content

Commit 963b8ae

Browse files
committed
DOC: Standardize params and document query range
1 parent 4c053d2 commit 963b8ae

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

databento/historical/api/batch.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ def submit_job(
5151
symbols: Optional[Union[List[str], str]],
5252
schema: Union[Schema, str],
5353
encoding: Union[Encoding, str] = "dbn",
54-
compression: Optional[Union[Compression, str]] = "none",
54+
compression: Optional[Union[Compression, str]] = "zstd",
5555
split_duration: Union[SplitDuration, str] = "day",
5656
split_size: Optional[int] = None,
57-
packaging: Union[Packaging, str] = "none",
57+
packaging: Optional[Union[Packaging, str]] = None,
5858
delivery: Union[Delivery, str] = "download",
5959
stype_in: Union[SType, str] = "native",
6060
stype_out: Union[SType, str] = "product_id",
@@ -85,14 +85,14 @@ def submit_job(
8585
The data record schema for the request.
8686
encoding : Encoding or str {'dbn', 'csv', 'json'}, default 'dbn'
8787
The data encoding.
88-
compression : Compression or str {'none', 'zstd'}, optional
88+
compression : Compression or str {'none', 'zstd'}, default 'zstd'
8989
The data compression format (if any).
9090
split_duration : SplitDuration or str {'day', 'week', 'month', 'none'}, default 'day'
9191
The maximum time duration before batched data is split into multiple files.
9292
A week starts on Sunday UTC.
9393
split_size : int, optional
9494
The maximum size (bytes) of each batched data file before being split.
95-
packaging : Packaging or str {'none', 'zip', 'tar'}, default 'none'
95+
packaging : Packaging or str {'none', 'zip', 'tar'}, optional
9696
The archive type to package all batched data files in.
9797
delivery : Delivery or str {'download', 's3', 'disk'}, default 'download'
9898
The delivery mechanism for the processed batched data files.
@@ -126,13 +126,20 @@ def submit_job(
126126
("encoding", str(validate_enum(encoding, Encoding, "encoding"))),
127127
(
128128
"compression",
129-
str(validate_enum(compression, Compression, "compression")),
129+
str(validate_enum(compression, Compression, "compression"))
130+
if compression
131+
else None,
130132
),
131133
(
132134
"split_duration",
133135
str(validate_enum(split_duration, SplitDuration, "split_duration")),
134136
),
135-
("packaging", str(validate_enum(packaging, Packaging, "packaging"))),
137+
(
138+
"packaging",
139+
str(validate_enum(packaging, Packaging, "packaging"))
140+
if packaging
141+
else None,
142+
),
136143
("delivery", str(validate_enum(delivery, Delivery, "delivery"))),
137144
]
138145

0 commit comments

Comments
 (0)