MCPcopy Index your code
hub / github.com/databento/dbn

github.com/databento/dbn @v0.61.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.61.0 ↗ · + Follow
1,959 symbols 4,581 edges 105 files 541 documented · 28%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dbn

build Documentation license Current Crates.io Version pypi-version Slack

Databento Binary Encoding (DBN) is an extremely fast message encoding and storage format for normalized market data. The DBN specification includes a simple, self-describing metadata header and a fixed set of struct definitions, which enforce a standardized way to normalize market data.

All official Databento client libraries use DBN under the hood, both as a data interchange format and for in-memory representation of data. DBN is also the default encoding for all Databento APIs, including live data streaming, historical data streaming, and batch flat files.

This repository contains both libraries and a CLI tool for working with DBN files and streams. Python bindings for dbn are provided in the databento_dbn package.

For more details, read our introduction to DBN.

Features

  • Performant binary encoding and decoding
  • Highly compressible with Zstandard
  • Extendable fixed-width schemas

Usage

See the respective READMEs for usage details: - dbn: Rust library crate - dbn-cli: CLI crate providing a dbn binary - databento-dbn: Python package

License

Distributed under the Apache 2.0 License.

Extension points exported contracts — how you extend this code

PyFieldDesc (Interface)
A trait for records that provide descriptions of their fields. [15 implementers]
rust/dbn/src/python.rs
Transcode (Interface)
(no doc) [1 implementers]
python/src/transcoder.rs
EncodeRecord (Interface)
Trait for types that encode a DBN record of a specific type. [8 implementers]
rust/dbn/src/encode.rs
EncodeRecordRef (Interface)
Trait for types that encode DBN records with mixed schemas. [8 implementers]
rust/dbn/src/encode.rs
EncodeDbn (Interface)
Trait for types that encode DBN records with a specific record type. [6 implementers]
rust/dbn/src/encode.rs
DecodeRecordRef (Interface)
Trait for types that decode references to DBN records of a dynamic type. [9 implementers]
rust/dbn/src/decode.rs

Core symbols most depended-on inside this repo

new_py_timestamp_or_datetime
called by 90
rust/dbn/src/python/conversions.rs
len
called by 89
rust/dbn/src/symbol_map.rs
to_owned
called by 73
rust/dbn/src/record_ref.rs
record_size
called by 64
rust/dbn/src/record/methods.rs
value
called by 58
rust/dbn/src/python/enums.rs
px_to_f64
called by 55
rust/dbn/src/pretty.rs
str_to_c_chars
called by 53
rust/dbn/src/record/conv.rs
push
called by 53
rust/dbn/src/decode/dbn/fsm.rs

Shape

Method 1,228
Function 530
Class 124
Enum 42
Interface 35

Languages

Rust100%
Python1%

Modules by API surface

rust/dbn/src/python/record.rs454 symbols
rust/dbn/src/record/methods.rs79 symbols
rust/dbn/src/decode/dbn/fsm.rs64 symbols
rust/dbn-cli/tests/integration_tests.rs55 symbols
rust/dbn/src/record_buf.rs49 symbols
rust/dbn/src/decode/dbn/sync.rs49 symbols
rust/dbn/src/encode/dbn/sync.rs45 symbols
rust/dbn/src/decode/dbn/async.rs45 symbols
rust/dbn/src/encode/csv/sync.rs44 symbols
rust/dbn/src/encode/dbn/async.rs42 symbols
rust/dbn/src/v1/methods.rs41 symbols
rust/dbn/src/encode/split.rs40 symbols

For agents

$ claude mcp add dbn \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact