Skip to content

Commit d94d864

Browse files
authored
VER: Release 0.60.0
See release notes.
2 parents be8aadd + 2477ae1 commit d94d864

File tree

9 files changed

+37
-15
lines changed

9 files changed

+37
-15
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## 0.60.0 - 2025-08-05
4+
5+
#### Enhancements
6+
- Added `parquet_schema` option to `DBNStore.to_parquet()` for overriding the pyarrow schema.
7+
- Upgraded `databento-dbn` to 0.39.0
8+
- Added `side()` and `unpaired_side()` methods to `ImbalanceMsg` that convert the fields
9+
of the same name to the `Side` enum
10+
- Added `pretty_auction_time` property in Python for `ImbalanceMsg`
11+
- Added `action` and `ts_in_delta` getters to `BboMsg`
12+
- Added `ts_recv` getter to `StatusMsg`
13+
- Added missing floating-point price getters to `InstrumentDefMsg` record types from all
14+
DBN versions
15+
- Added more floating-point price getters to `ImbalanceMsg`
16+
- Added floating-point price getter to `StatMsg`
17+
- Standardize Python `__init__` type signatures
18+
- Changed `auction_time` field in `ImbalanceMsg` to be formatted as a timestamp
19+
- Fixed a regression where some enum constructors no longer raised a `DBNError` in
20+
Python
21+
22+
#### Bug fixes
23+
- Removed unused `S3` and `Disk` variants from `Delivery` enum
24+
325
## 0.59.0 - 2025-07-15
426

527
#### Enhancements

databento/common/dbnstore.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,7 @@ def to_parquet(
984984
map_symbols: bool = True,
985985
schema: Schema | str | None = None,
986986
mode: Literal["w", "x"] = "w",
987+
parquet_schema: pa.Schema | None = None,
987988
**kwargs: Any,
988989
) -> None:
989990
"""
@@ -1010,6 +1011,9 @@ def to_parquet(
10101011
This is only required when reading a DBN stream with mixed record types.
10111012
mode : str, default "w"
10121013
The file write mode to use, either "x" or "w".
1014+
parquet_schema : pyarrow.Schema, optional
1015+
The pyarrow parquet schema to use to write the parquet file.
1016+
This defaults to a detected schema based on the DataFrame representation.
10131017
**kwargs : Any
10141018
Keyword arguments to pass to the `pyarrow.parquet.ParquetWriter`.
10151019
These can be used to override the default behavior of the writer.
@@ -1046,10 +1050,11 @@ def to_parquet(
10461050
for frame in dataframe_iter:
10471051
if writer is None:
10481052
# Initialize the writer using the first DataFrame
1049-
parquet_schema = pa.Schema.from_pandas(frame)
1053+
if parquet_schema is None:
1054+
parquet_schema = pa.Schema.from_pandas(frame)
10501055
writer = pq.ParquetWriter(
10511056
where=kwargs.pop("where", file_path),
1052-
schema=kwargs.pop("schema", parquet_schema),
1057+
schema=parquet_schema,
10531058
**kwargs,
10541059
)
10551060
writer.write_table(

databento/common/enums.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ class Delivery(StringyMixin, str, Enum):
157157
"""
158158

159159
DOWNLOAD = "download"
160-
S3 = "s3"
161-
DISK = "disk"
162160

163161

164162
@unique

databento/historical/api/batch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ def submit_job(
126126
split_size : int, optional
127127
The maximum size (bytes) of each batched data file before being split.
128128
Must be an integer between 1e9 and 10e9 inclusive (1GB - 10GB).
129-
delivery : Delivery or str {'download', 's3', 'disk'}, default 'download'
129+
delivery : Delivery or str {'download'}, default 'download'
130130
The delivery mechanism for the processed batched data files.
131+
Only 'download' is supported at this time.
131132
stype_in : SType or str, default 'raw_symbol'
132133
The input symbology type to resolve from.
133134
stype_out : SType or str, default 'instrument_id'

databento/live/protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class DatabentoLiveProtocol(asyncio.BufferedProtocol):
5555
dataset : Dataset or str
5656
The dataset for authentication.
5757
ts_out : bool, default False
58-
Flag for requesting `ts_out` to be appending to all records in the session.
58+
Flag for requesting `ts_out` to be appended to all records in the session.
5959
heartbeat_interval_s: int, optional
6060
The interval in seconds at which the gateway will send heartbeat records if no
6161
other data records are sent.

databento/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.59.0"
1+
__version__ = "0.60.0"

examples/live_smoke_test.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,14 @@ def run_client_with_snapshot(args: argparse.Namespace) -> None:
8080
print("Starting client...")
8181

8282
for record in client:
83-
if isinstance(record, SymbolMappingMsg):
84-
continue
85-
elif isinstance(record, MBOMsg):
83+
if isinstance(record, MBOMsg):
8684
if record.flags & RecordFlags.F_SNAPSHOT:
8785
received_snapshot_record = True
8886
else:
8987
print(f"Received expected record {record}")
9088
break
9189
elif isinstance(record, ErrorMsg):
9290
raise ValueError(f"Received error {record.err}")
93-
else:
94-
raise ValueError(f"Received unexpected record {record}")
9591

9692
print("Finished client")
9793

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "databento"
3-
version = "0.59.0"
3+
version = "0.60.0"
44
description = "Official Python client library for Databento"
55
authors = [
66
"Databento <[email protected]>",
@@ -32,7 +32,7 @@ aiohttp = [
3232
{version = "^3.8.3", python = "<3.12"},
3333
{version = "^3.9.0", python = "^3.12"}
3434
]
35-
databento-dbn = "~=0.37.1"
35+
databento-dbn = "~=0.39.0"
3636
numpy = [
3737
{version = ">=1.23.5", python = "<3.12"},
3838
{version = ">=1.26.0", python = "^3.12"}

tests/test_common_symbology.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def test_instrument_map_insert_symbol_mapping_message_v1(
362362
end_ts=end_date,
363363
)
364364
sym_msg_v1 = SymbolMappingMsgV1(
365-
publisher_id=sym_msg.publisher_id, # type: ignore [call-arg]
365+
publisher_id=sym_msg.publisher_id,
366366
instrument_id=sym_msg.instrument_id,
367367
ts_event=sym_msg.ts_event,
368368
stype_in_symbol=sym_msg.stype_in_symbol,

0 commit comments

Comments
 (0)