Skip to main content

Library for working with the Databento Binary Encoding (DBZ) format

Project description

dbz-lib

The official library for working with the Databento Binary Encoding (DBZ) format.

Usage

The primary point for entrypoint for dbz_lib is the Dbz object, which represents the contents of one DBZ file or byte stream. To read a DBZ file with MBO data and print each row:

use db_def::tick::TickMsg;
use dbz_lib::Dbz;

let dbz = Dbz::from_file("20201228.mbo.dbz")?;
for tick in dbz.try_into_iter::<TickMsg>() {
    println!("{tick:?}");
}

The documentation provides an overview of all methods and features.

Documentation

FIXME: when prepping to release to crates.io

Building

dbz is written in Rust, so you'll need to have Rust installed first.

To build, run the following commands:

git clone https://github.com/databento/dbz
cd dbz
cargo build --release

Python bindings

To also include the optional Python bindings when running any cargo command, pass the --all-features flag or --features=python. For example, to build all of dbz with Python bindings, run:

cargo build --all-features

To create a Python package from dbz-lib, you'll need to install Maturin. For a Python package to develop against, run:

maturin develop -F python

This will install a package named dbz_lib in your current Python environment.

Testing

Tests are run through cargo test and are located within each module.

License

Distributed under the Apache 2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dbz_lib-0.1.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.7 kB view details)

Uploaded Python 3 manylinux: glibc 2.5+ x86-64

File details

Details for the file dbz_lib-0.1.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for dbz_lib-0.1.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f2ca396a817827cfae646e61dd00be1a4caa6086b4081a4bfcb189a2d67a302e
MD5 6d57946d1dfb5d4318b3e8945dc27aef
BLAKE2b-256 1e8a8d7554c5fa0631a423a65048b98ec9f2ad8611e82c2ac690e8cd67a91931

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page