Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.69.0 - 2026-01-13

#### Enhancements
- Upgraded `databento-dbn` to 0.46.0
- Added `DBNRecord` union type to Python which includes all record types
- Removed `Record` class from Python type stubs to match code: the record classes don't
share a base class. Use `DBNRecord` instead.

#### Breaking changes
- Removed `DBNRecord` union type from `databento.common.types`, use `databento_dbn.DBNRecord` instead

## 0.68.2 - 2026-01-06

#### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The library is fully compatible with distributions of Anaconda 2023.x and above.
The minimum dependencies as found in the `pyproject.toml` are also listed below:
- python = "^3.10"
- aiohttp = "^3.8.3"
- databento-dbn = "~0.45.0"
- databento-dbn = "~0.46.0"
- numpy = ">=1.23.5"
- pandas = ">=1.5.3"
- pip-system-certs = ">=4.0" (Windows only)
Expand Down
2 changes: 1 addition & 1 deletion databento/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from databento_dbn import CMBP1Msg
from databento_dbn import Compression
from databento_dbn import ConsolidatedBidAskPair
from databento_dbn import DBNRecord
from databento_dbn import Encoding
from databento_dbn import ErrorCode
from databento_dbn import ErrorMsg
Expand Down Expand Up @@ -74,7 +75,6 @@
from databento.common.publishers import Publisher
from databento.common.publishers import Venue
from databento.common.symbology import InstrumentMap
from databento.common.types import DBNRecord
from databento.historical.client import Historical
from databento.live.client import Live
from databento.reference.client import Reference
Expand Down
3 changes: 1 addition & 2 deletions databento/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from databento_dbn import BBOMsg
from databento_dbn import CBBOMsg
from databento_dbn import CMBP1Msg
from databento_dbn import DBNRecord
from databento_dbn import ImbalanceMsg
from databento_dbn import InstrumentDefMsg
from databento_dbn import MBOMsg
Expand All @@ -17,8 +18,6 @@
from databento_dbn import v1
from databento_dbn import v2

from databento.common.types import DBNRecord


ALL_SYMBOLS: Final = "ALL_SYMBOLS"

Expand Down
2 changes: 1 addition & 1 deletion databento/common/dbnstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from databento_dbn import UNDEF_PRICE
from databento_dbn import Compression
from databento_dbn import DBNDecoder
from databento_dbn import DBNRecord
from databento_dbn import Encoding
from databento_dbn import InstrumentDefMsg
from databento_dbn import InstrumentDefMsgV1
Expand All @@ -54,7 +55,6 @@
from databento.common.error import BentoError
from databento.common.error import BentoWarning
from databento.common.symbology import InstrumentMap
from databento.common.types import DBNRecord
from databento.common.types import Default
from databento.common.types import MappingIntervalDict
from databento.common.validation import validate_enum
Expand Down
28 changes: 2 additions & 26 deletions databento/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,6 @@

logger = logging.getLogger(__name__)

DBNRecord = (
databento_dbn.BBOMsg
| databento_dbn.CBBOMsg
| databento_dbn.CMBP1Msg
| databento_dbn.MBOMsg
| databento_dbn.MBP1Msg
| databento_dbn.MBP10Msg
| databento_dbn.TradeMsg
| databento_dbn.OHLCVMsg
| databento_dbn.ImbalanceMsg
| databento_dbn.InstrumentDefMsg
| databento_dbn.InstrumentDefMsgV1
| databento_dbn.InstrumentDefMsgV2
| databento_dbn.StatMsg
| databento_dbn.StatMsgV1
| databento_dbn.StatusMsg
| databento_dbn.SymbolMappingMsg
| databento_dbn.SymbolMappingMsgV1
| databento_dbn.SystemMsg
| databento_dbn.SystemMsgV1
| databento_dbn.ErrorMsg
| databento_dbn.ErrorMsgV1
)

_T = TypeVar("_T")


Expand Down Expand Up @@ -95,7 +71,7 @@ class MappingIntervalDict(TypedDict):
symbol: str


RecordCallback = Callable[[DBNRecord], None]
RecordCallback = Callable[[databento_dbn.DBNRecord], None]
ExceptionCallback = Callable[[Exception], None]
ReconnectCallback = Callable[[pd.Timestamp, pd.Timestamp], None]

Expand Down Expand Up @@ -243,7 +219,7 @@ def callback_name(self) -> str:
def exc_callback_name(self) -> str:
return getattr(self._exc_fn, "__name__", str(self._exc_fn))

def call(self, record: DBNRecord) -> None:
def call(self, record: databento_dbn.DBNRecord) -> None:
"""
Execute the callback function, passing `record` in as the first
argument. Any exceptions encountered will be dispatched to the
Expand Down
5 changes: 3 additions & 2 deletions databento/live/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import databento_dbn
import pandas as pd
from databento_dbn import DBNRecord
from databento_dbn import Schema
from databento_dbn import SType

Expand All @@ -25,7 +26,6 @@
from databento.common.publishers import Dataset
from databento.common.types import ClientRecordCallback
from databento.common.types import ClientStream
from databento.common.types import DBNRecord
from databento.common.types import ExceptionCallback
from databento.common.types import ReconnectCallback
from databento.common.types import RecordCallback
Expand Down Expand Up @@ -57,7 +57,8 @@ class Live:
gateway.
heartbeat_interval_s: int, optional
The interval in seconds at which the gateway will send heartbeat records if no
other data records are sent.
other data records are sent. By default heartbeats will be sent at the gateway's
default interval. Minimum interval is 5 seconds.
reconnect_policy: ReconnectPolicy | str, optional
The reconnect policy for the live session.
- "none": the client will not reconnect (default)
Expand Down
2 changes: 1 addition & 1 deletion databento/live/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from typing import Final

import databento_dbn
from databento_dbn import DBNRecord
from databento_dbn import Metadata
from databento_dbn import Schema
from databento_dbn import SType
Expand All @@ -19,7 +20,6 @@
from databento.common.parsing import optional_datetime_to_unix_nanoseconds
from databento.common.parsing import symbols_list_to_list
from databento.common.publishers import Dataset
from databento.common.types import DBNRecord
from databento.common.validation import validate_enum
from databento.common.validation import validate_semantic_string
from databento.live.gateway import AuthenticationRequest
Expand Down
2 changes: 1 addition & 1 deletion databento/live/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import databento_dbn
import pandas as pd
from databento_dbn import DBNRecord
from databento_dbn import Schema
from databento_dbn import SType

Expand All @@ -23,7 +24,6 @@
from databento.common.publishers import Dataset
from databento.common.types import ClientRecordCallback
from databento.common.types import ClientStream
from databento.common.types import DBNRecord
from databento.common.types import ExceptionCallback
from databento.common.types import ReconnectCallback
from databento.live.gateway import SubscriptionRequest
Expand Down
2 changes: 1 addition & 1 deletion databento/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.68.2"
__version__ = "0.69.0"
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "databento"
version = "0.68.2"
version = "0.69.0"
description = "Official Python client library for Databento"
readme = "README.md"
requires-python = ">=3.10"
Expand All @@ -10,7 +10,7 @@ dynamic = [ "classifiers" ]
dependencies = [
"aiohttp>=3.8.3,<4.0.0; python_version < '3.12'",
"aiohttp>=3.9.0,<4.0.0; python_version >= '3.12'",
"databento-dbn~=0.45.0",
"databento-dbn~=0.46.0",
"numpy>=1.23.5; python_version < '3.12'",
"numpy>=1.26.0; python_version >= '3.12'",
"pandas>=1.5.3",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_historical_bento.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import pytz
import zstandard
from databento_dbn import Compression
from databento_dbn import DBNRecord
from databento_dbn import MBOMsg
from databento_dbn import Schema
from databento_dbn import SType
Expand All @@ -26,7 +27,6 @@
from databento.common.error import BentoError
from databento.common.error import BentoWarning
from databento.common.publishers import Dataset
from databento.common.types import DBNRecord


def test_from_file_when_not_exists_raises_expected_exception() -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_live_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import databento_dbn
import pytest
import zstandard
from databento_dbn import DBNRecord
from databento_dbn import Encoding
from databento_dbn import Schema
from databento_dbn import SType
Expand All @@ -25,7 +26,6 @@
from databento.common.dbnstore import DBNStore
from databento.common.error import BentoError
from databento.common.publishers import Dataset
from databento.common.types import DBNRecord
from databento.live import client
from databento.live import gateway
from databento.live import protocol
Expand Down
2 changes: 1 addition & 1 deletion tests/test_live_client_reconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import pandas as pd
import pytest
from databento_dbn import DBNRecord

from databento import Dataset
from databento import Schema
from databento import SType
from databento.common.enums import ReconnectPolicy
from databento.common.types import DBNRecord
from databento.live import client
from databento.live.gateway import AuthenticationRequest
from databento.live.gateway import SessionStart
Expand Down