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.1-cp39-cp39-manylinux_2_24_x86_64.whl (647.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

File details

Details for the file dbz_lib-0.1.1-cp39-cp39-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for dbz_lib-0.1.1-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 d33bd762ec312aa73b1cf12b55ff66bc6b9edb4b9044bedc31b62e2710952db3
MD5 658723752164025a0139d047a41bb0cc
BLAKE2b-256 d3035c9aeeb37eddd3852d94b35e67299fa9e19e721bb700b475c6de5fec44b4

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