Skip to content

Commit 6254b3d

Browse files
committed
DOC: Standardize API reference pt2
1 parent 094b4fc commit 6254b3d

File tree

7 files changed

+29
-22
lines changed

7 files changed

+29
-22
lines changed

databento/common/bento.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def symbols(self) -> List[str]:
226226
@property
227227
def stype_in(self) -> SType:
228228
"""
229-
Return the query input symbol type for the data.
229+
Return the query input symbology type for the data.
230230
231231
Returns
232232
-------
@@ -242,7 +242,7 @@ def stype_in(self) -> SType:
242242
@property
243243
def stype_out(self) -> SType:
244244
"""
245-
Return the query output symbol type for the data.
245+
Return the query output symbology type for the data.
246246
247247
Returns
248248
-------

databento/common/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Delivery(Enum):
101101

102102
@unique
103103
class SType(Enum):
104-
"""Represents a symbology symbol type."""
104+
"""Represents a symbology type."""
105105

106106
PRODUCT_ID = "product_id"
107107
NATIVE = "native"

databento/historical/api/batch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ def timeseries_submit(
7878
delivery : Delivery or str {'download', 's3', 'disk'}, default 'download'
7979
The batch data delivery mechanism.
8080
stype_in : SType or str, default 'native'
81-
The input symbol type to resolve from.
81+
The input symbology type to resolve from.
8282
stype_out : SType or str, default 'product_id'
83-
The output symbol type to resolve to.
83+
The output symbology type to resolve to.
8484
limit : int, optional
8585
The maximum number of records for the request.
86+
If ``None`` is passed then no limit.
8687
8788
Returns
8889
-------

databento/historical/api/metadata.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def list_datasets(
3131
end_date: Optional[Union[date, str]] = None,
3232
) -> List[str]:
3333
"""
34-
List all datasets available from Databento.
34+
List all available datasets from Databento.
3535
3636
Makes a `GET /v0/metadata.list_datasets` HTTP request.
3737
@@ -80,7 +80,7 @@ def list_schemas(
8080
end_date: Optional[Union[date, str]] = None,
8181
) -> List[str]:
8282
"""
83-
List all data schemas available from Databento.
83+
List all available data schemas from Databento.
8484
8585
Makes a `GET /v0/metadata.list_schemas` HTTP request.
8686
@@ -166,7 +166,7 @@ def list_fields(
166166

167167
def list_encodings(self) -> List[str]:
168168
"""
169-
List all data encodings available from Databento.
169+
List all available data encodings from Databento.
170170
171171
Makes a `GET /v0/metadata.list_encodings` HTTP request.
172172
@@ -183,7 +183,7 @@ def list_encodings(self) -> List[str]:
183183

184184
def list_compressions(self) -> List[str]:
185185
"""
186-
List all data compression modes available from Databento.
186+
List all available data compression modes from Databento.
187187
188188
Makes a `GET /v0/metadata.list_compressions` HTTP request.
189189
@@ -279,13 +279,15 @@ def get_shape(
279279
encoding : Encoding or str {'dbz', 'csv', 'json'}, optional
280280
The data encoding.
281281
stype_in : SType or str, default 'native'
282-
The input symbol type to resolve from.
282+
The input symbology type to resolve from.
283283
limit : int, optional
284284
The maximum number of records to include in the query.
285+
If ``None`` is passed then no limit.
285286
286287
Returns
287288
-------
288289
Tuple
290+
The shape of the data expressed as size per dimension.
289291
290292
"""
291293
validate_enum(schema, Schema, "schema")
@@ -319,7 +321,7 @@ def get_shape(
319321
)
320322

321323
values = response.json()
322-
return values[0], values[1]
324+
return tuple(values)
323325

324326
def get_billable_size(
325327
self,
@@ -354,9 +356,10 @@ def get_billable_size(
354356
Assumes UTC as timezone unless passed a tz-aware object.
355357
If using an integer then this represents nanoseconds since UNIX epoch.
356358
stype_in : SType or str, default 'native'
357-
The input symbol type to resolve from.
359+
The input symbology type to resolve from.
358360
limit : int, optional
359361
The maximum number of records to include in the query.
362+
If ``None`` is passed then no limit.
360363
361364
Returns
362365
-------
@@ -400,7 +403,7 @@ def get_cost(
400403
limit: Optional[int] = None,
401404
) -> float:
402405
"""
403-
Get the expected total cost of the data stream.
406+
Get cost in US Dollars for a historical streaming or batch data request.
404407
405408
Makes a `GET /v0/metadata.get_cost` HTTP request.
406409
@@ -423,14 +426,15 @@ def get_cost(
423426
Assumes UTC as timezone unless passed a tz-aware object.
424427
If using an integer then this represents nanoseconds since UNIX epoch.
425428
stype_in : SType or str, default 'native'
426-
The input symbol type to resolve from.
429+
The input symbology type to resolve from.
427430
limit : int, optional
428431
The maximum number of records to include in the query.
432+
If ``None`` is passed then no limit.
429433
430434
Returns
431435
-------
432436
float
433-
The cost for the data in US Dollars.
437+
The cost in US Dollars.
434438
435439
"""
436440
validate_enum(mode, FeedMode, "mode")

databento/historical/api/symbology.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def resolve(
4040
symbols : List[Union[str, int]] or str, optional
4141
The symbols to resolve.
4242
stype_in : SType or str, default 'native'
43-
The input symbol type to resolve from.
43+
The input symbology type to resolve from.
4444
stype_out : SType or str, default 'product_id'
45-
The output symbol type to resolve to.
45+
The output symbology type to resolve to.
4646
start_date : date or str
4747
The start date (UTC) of the request time range (inclusive).
4848
end_date : date or str

databento/historical/api/timeseries.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ def stream(
5656
The end datetime (UTC) of the request time range (exclusive).
5757
If using an integer then this represents nanoseconds since UNIX epoch.
5858
stype_in : SType or str, default 'native'
59-
The input symbol type to resolve from.
59+
The input symbology type to resolve from.
6060
stype_out : SType or str, default 'product_id'
61-
The output symbol type to resolve to.
61+
The output symbology type to resolve to.
6262
limit : int, optional
6363
The maximum number of records to return.
64+
If ``None`` is passed then no limit.
6465
path : str, optional
65-
The path to the file to write to on disk (if provided).
66+
The file path to write to on disk (if provided).
6667
6768
Returns
6869
-------
@@ -154,8 +155,9 @@ async def stream_async(
154155
The output symbology type to resolve to.
155156
limit : int, optional
156157
The maximum number of records to return.
158+
If ``None`` is passed then no limit.
157159
path : str, optional
158-
The path to the file to write to (if provided).
160+
The file path to write to on disk (if provided).
159161
160162
Returns
161163
-------

databento/historical/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def request_full_definitions(
125125
data : Bento
126126
The bento to source the metadata from.
127127
path : str, optional
128-
The optional path to stream the data to on disk.
128+
The file path to write to on disk (if provided).
129129
130130
Returns
131131
-------

0 commit comments

Comments
 (0)