Databento-dbn

Latest version: v0.24.0

Safety actively analyzes 688178 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 9

0.12.0

Enhancements
- Added `map_symbols` support to Python `Transcoder`
- Added new publisher variants in preparation for DBEQ.PLUS dataset
- Added `from_dataset_venue` function to `Publisher` to facilitate destructuring
- Implemented `Default` for most records to make testing easier
- Added `from_zstd` function to `AsyncDbnEncoder` to match synchronous encoder
- Added re-exports for `enums::flags`, `enums::rtype`, `record::BidAskPair`,
`record::RecordHeader`, and `record::WithTsOut` to simplify imports
- Added `--fragment` CLI flag for writing DBN without the metadata header
- Added `--input-dbn-version` CLI option for specifying the DBN version of a DBN
fragment
- Added `serde::Deserialize` implementations for `Dataset`, `Venue`, and `Publisher`
- Added support for Python 3.12 to `databento_dbn`
- Added `RecordDecoder::with_version` for future use when dealing with compatibility
between different DBN versions
- Added new dispatch macros: `rtype_ts_out_method_dispatch`,
`rtype_ts_out_async_method_dispatch`, `rtype_method_dispatch`, and
`schema_ts_out_method_dispatch`
- Added `InstrumentDefMsgV2` and `SymbolMappingMsgV2` for forward compatibility with a
version of DBN
- Added `TsSymbolMap` and `PitSymbolMap` to aid with both historical and live symbology
- Added support for inverse symbology, i.e. with `stype_in=InstrumentId`

Breaking changes
- Changed `Metadata::symbol_map` to return `TsSymbolMap`
- Changed `Metadata::symbol_map_for_date` to return `PitSymbolMap`
- Changed `Default` implementation for `BidAskPair` by setting prices to `UNDEF_PRICE`
- Added new publisher values in preparation for DBEQ.PLUS
- Added `ts_out` parameter to `encode_header_for_schema` in `CsvEncoder` and
`DynEncoder` to allow controlling whether "ts_out" is in the header

0.11.1

Enhancements
- Upgraded `async-compression` to 0.4.3
- Upgraded `csv` to 1.3
- Upgraded `num_enum` to 0.7

Bug fixes
- Changed DBN stream detection to ignore the DBN version

0.11.0

Enhancements
- Added new `EncodeRecordTextExt` trait which is implemented for the CSV and JSON
encoders. It adds two methods for encoding a `symbol` field along side the rest of the
record fields, matching the behavior of `map_symbols` in the historical API
- Added `encode_header` and `encode_header_for_schema` methods to `CsvEncoder` and
`DynEncoder` to give more flexibility for encoding CSV headers
- Added `from_file` and `from_zstd_file` functions to `AsyncDbnDecoder` to match
synchronous decoder
- Implemented `Copy` for `RecordRef` to make it behave more like a reference
- Added `AsyncDbnEncoder` for simpler DBN encoding and to match sync API
- Added `RecordEnum` and `RecordRefEnum` to more easily be able to pattern match on
records of different types
- Added `ARCX.PILLAR.ARCX` publisher
- Added `From` DBN records for `RecordRef`
- Added re-exports to the top level of the crate for all enums and records for simpler
imports
- Added `ClosePrice` and `NetChange` `StatType`s used in the `OPRA.PILLAR` dataset

Breaking changes
- Split `encode_record_ref` into a safe method with no arguments and an unsafe method
with a `ts_out` parameter to reduce `unsafe` usage when not working with live data
that may contain `ts_out`

Bug fixes
- Fixed `dbn` CLI not writing CSV header when using `--fragment` and `--zstd-fragment`
flags
- Fixed lifetime on return value from `RecordRef::get_unchecked`
- Fixed missing check for `stype_out` before building `Metadata` symbology maps

0.10.2

Bug fixes
- Fixed query range checking in `Metadata::symbol_map_for_date`
- Added `debug_assert_eq!` check for alignment in `RecordRef::new`

0.10.1

Bug fixes
- Changed `Metadata::symbol_map` and `symbol_map_for_date` to return `String` values
instead of `&str`, which made it difficult to use

0.10.0

Enhancements
- Added `start` and `end` getters to `Metadata` that return `time::OffsetDateTime`
- Added `symbol_map` and `symbol_map_for_date` methods to `Metadata` to aid historical
symbology mapping from the instrument IDs in records
- Added `DynReader` struct for being agnostic about whether an input stream is
zstd-compressed
- Improved safety of `RecordRef::get` by adding length check
- Added Python DBN `Transcoder` class for converting DBN to JSON and CSV with optional
zstd compression
- Added optional `has_metadata` parameter to Python `DBNDecoder` to allow
decoding plain records by passing `False`. By default `DBNDecoder` expects a complete
DBN stream, which begins with metadata
- Added `get_ref` methods to `dbn::Decoder` and `dbn::RecordDecoder` which return a
reference to the inner reader
- Added `UNDEF_PRICE`, `UNDEF_ORDER_SIZE`, `UNDEF_STAT_QUANTITY`, and `UNDEF_TIMESTAMP`
constants to `databento_dbn` Python package to make it easier to filter null values
- Added `Metadata::builder()` function to create a new builder instance

Breaking changes
- Split out `EncodeRecordRef` trait from `EncodeDbn` to have a boxable trait (i.e.
`Box<dyn EncodeRecordRef>`) for dynamic encoding
- Split out `EncodeRecord` trait from `EncodeDbn`
- Split out `DecodeRecordRef` trait from `DecodeDbn` to have a boxable trait (i.e.
`Box<dyn DecodeRecordRef>`) for dynamic decoding
- Changed `DynWriter` from an enum to a struct with only private fields

Bug fixes
- Fixed typo in `BATY.PITCH.BATY` publisher
- Fixed typo in `README.md` (credit: thomas-k-cameron)

Page 5 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.