Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dbz-lib

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbz-lib

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

  • 0.1.3
  • PyPI
  • Socket score

Maintainers
1

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc