Native Databento bindings based on dbn Rust crate
Project description
databento-dbn
Python bindings for the dbn
Rust library.
Used by the Databento Python client library.
Using this library is for advanced users and is not fully documented or supported.
Installation
To install the latest stable version from PyPI:
pip install -U databento-dbn
Usage
To read the metadata from a DBN file into a dict
, read the raw bytes and pass them to decode_metadata
.
from databento_dbn import decode_metadata
with open("my.dbn.zst", "rb") as fin:
metadata = decode_metadata(fin.read())
# Print symbology mappings
print(metadata["mappings"])
You can write Zstd-compressed DBN files using write_dbn_file
:
from databento_dbn import write_dbn_file
records = [
{"rtype": 160, "publisher_id": 1, "instrument_id": 1, "ts_event": 647784973705, "order_id": 1,
"price": 3723000000000, "size": 1, "flags": 128, "channel_id": 0, "action": ord('C'),
"side": ord('A'), "ts_recv": 1609160400000704060, "ts_in_delta": 0, "sequence": 1170352}
]
with open("my.dbn.zst", "wb") as out:
write_dbn_file(file=out, compression="zstd", schema="mbo", dataset="custom",
records=records, stype="instrument_id")
Note that the keys in the dictionaries in records
must match the field names of the schema, or
the function will raise a KeyError
.
Building
databento-dbn
is written in Rust, so you'll need to have Rust installed
as well as Maturin.
To build, run the following commands:
git clone https://github.com/databento/dbn
cd dbn
maturin build
To build the Python package and install it for the active Python interpreter in your PATH
, run:
maturin develop
This will install a package named databento-dbn
in your current Python environment.
License
Distributed under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for databento_dbn-0.6.0-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b273240923c96e3138fcd88cd7276e7ee9aa3792efe14e711ce9780e6554e58 |
|
MD5 | 119119d51ead4ab0e4eed7ece65f791e |
|
BLAKE2b-256 | 04f230a34308d205da7dde17dd1b9a70d56a446e2c13a1fe53cd80b04b35e89f |
Hashes for databento_dbn-0.6.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b244034a607f2b40cd8120d5ff4024438b696372ca6ad727879e226846f4f57f |
|
MD5 | fad51451a0cdbc494f085a88d802ba4b |
|
BLAKE2b-256 | cf425b45ba8a5dae48acb1245c34be6613debc45b3c6c62319915ef45b84bc57 |
Hashes for databento_dbn-0.6.0-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 800e6da9dc8b1fba3e2ba6e2995baf6ab49be3ac6ae9ca423ca76ba3cc852862 |
|
MD5 | 54d8cda1cebc94525119fb5610781680 |
|
BLAKE2b-256 | 6bad7c63a354288acc88cf57a05e8f600799b1706bbda9f158d7958c5719a91a |
Hashes for databento_dbn-0.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dd4c3ee08eb9f1a13e69fb1296027511331e02af3e902a4bdd3962783bd44df |
|
MD5 | a73ee97400807fe97da263b442a79224 |
|
BLAKE2b-256 | daff301828aeac020b1761a78bb5eac32820ac3ae8f2cf6cae579f9a13b12314 |
Hashes for databento_dbn-0.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 560484eca796b733906a2a61c5cfe60a650b63a1618cf19dec9a11544f883a29 |
|
MD5 | 14f1d8cfb2943a2158b795a1510758a8 |
|
BLAKE2b-256 | 0341da85ad0c7b956a1b8fde6ff18af30119006d908d29e05456c4794d850078 |
Hashes for databento_dbn-0.6.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7061bd9e2713a5b2f71ed3fc4d3dfaa5729b7f4f43667f912a66a5c2c23edd6f |
|
MD5 | ebefbb9e7983a290ccebff180c8102ee |
|
BLAKE2b-256 | 963c2e66b8543b0178779ecbc080531ed9800396b5e1b589e70bd658d6546a60 |
Hashes for databento_dbn-0.6.0-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbd486f832d61c67ccd7b92283460d2dd6b9c38209e3d492a32c091a378a2ef8 |
|
MD5 | 95cde79a604d2b85fc7710df7f61bf4c |
|
BLAKE2b-256 | be89ad053a01468b5ae66fe1c4fe23002ac8a2f0a0d72e072092a5b7a18709f5 |
Hashes for databento_dbn-0.6.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef133157c4a8d8f5e64618d5204ad05d77a2863aaeb7db3d1ca386799357c521 |
|
MD5 | 2c3e9ddce10c8f2c8d5a4a71f0e98e96 |
|
BLAKE2b-256 | 092963394847b9afccc5df8c6f99e96de5aeeb0befad86798380be6959a9aaef |
Hashes for databento_dbn-0.6.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8648f93f39c955f6ad86c5930499c70d588050d8ba2777cbc066144dadadb4c2 |
|
MD5 | 223719588effb5b0f52fe5f9570a1bc6 |
|
BLAKE2b-256 | 70450009618cb7523e7b5953d0fcf086775118e570ad9339e475b4543cef51be |
Hashes for databento_dbn-0.6.0-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebcd9574c35aad0cffc7a0327b383ba150db17c1cd7594009fe9e9c694783e08 |
|
MD5 | 8e055fe6180192ad40af229194a3fbf7 |
|
BLAKE2b-256 | 7c330245d8b12d67e4dd043cbb0fab552241f72d505ddebbf7647c987943c5d7 |
Hashes for databento_dbn-0.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c34fd14c8584f9696d753ba2f1396da244c9478e6f5ac7c63ba7ba537236595 |
|
MD5 | 4764c7bbda1a2214dd23a3606591d91c |
|
BLAKE2b-256 | feecada49b4099e92f14e9eee0f3de2b53f8e73862c4f1cf0255e68a7986778a |
Hashes for databento_dbn-0.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d886c4afa24235d63a6bbbfa2feb6abbf31c4feaa2a8867e9974256ab627f21 |
|
MD5 | b024ca632111cfc00342ef6dd5b28569 |
|
BLAKE2b-256 | 404b7c013a605b9ee1dad51bde90d0faaf7824813a22ef8ce70d952c495b021c |
Hashes for databento_dbn-0.6.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e955908c60235f40b11a4946c3fc0effd18afb71e969f06026f570f9275bc9 |
|
MD5 | d101fb307b612b837dc52646480a1164 |
|
BLAKE2b-256 | 9a8bcc75c21b8246a59eaace36d5df1d0f437a8a2179ddca565ce63e3b958b90 |
Hashes for databento_dbn-0.6.0-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7abe58c26177fc268c8e693cba3db0ffe058512fc97335ff0714603688c0e01a |
|
MD5 | 97df57a5bb324353a0cf7331d771b700 |
|
BLAKE2b-256 | f1d1745c65c027c032aebc5e20dfac079509840a8af87762c7579956781d8071 |
Hashes for databento_dbn-0.6.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b6c19b9e9b67aa4eff934ccc05973cc3dce4cfe167cbefd180af1ca30bae23f |
|
MD5 | ed5db92717bd3a5deb9b78880e1eed95 |
|
BLAKE2b-256 | 8eac1c1a59260bb64d262184981ca374b05addd7c4a21abd8a3c310220ae14ec |
Hashes for databento_dbn-0.6.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1853b2271960529e3e72a9f52d15034149995608ef1883d64dee486f26bc240 |
|
MD5 | 50cef5553dfea607774b9341de9e1af1 |
|
BLAKE2b-256 | bc09a899c10bbafd30a9a03cac5dfd5338527f62e4a57c851eca509135f32741 |
Hashes for databento_dbn-0.6.0-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b8ce57e701db32b0c88d954cb3520d6e75bbe11c07f83221873a7c7308c2002 |
|
MD5 | 65c5d9730d41661be8e2d45d113adb8c |
|
BLAKE2b-256 | b673f59c467759a62a78ca39c62bcab9e3de3c4245cd00a581a4b89704de3f83 |
Hashes for databento_dbn-0.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | affc268817551bfb726c9fb62984a9a2db9349894c10396db78d3fcd3e40505e |
|
MD5 | 6367267daec2c32f6564d32acbc25b9b |
|
BLAKE2b-256 | 42fa8c77ad30c614d919c665dcecf89e3c90eb6120ebaad833a6f323eca9e524 |
Hashes for databento_dbn-0.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0c1a7f87623b2b16b6c54980f3d79e28817e3218eeb4abb7b989c368295bbe4 |
|
MD5 | 9a518c8bf430ab7647d56b134dcf3947 |
|
BLAKE2b-256 | 1b50c637887c1b2998ed8cc5b11a47cf90a912b7a70cf141f1260ce8c721f3bd |
Hashes for databento_dbn-0.6.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6465fd0b8eb28129752b89c0eb9cf62cba891f884de674b3ccfa186d6543627 |
|
MD5 | 297d0f4e6f75b98ede33e6b54f2372ba |
|
BLAKE2b-256 | f0a27917c7b94ab1587fe4648dde2d1f3aa33f5bc65e692d74efaa984f7fe3a9 |
Hashes for databento_dbn-0.6.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fda756a13e3878928ac4d9730230bc08fb2dd4777d53137d442d4ccf170adae5 |
|
MD5 | adf1e18726caf1393d464203e75fb746 |
|
BLAKE2b-256 | 0f8cf1f35a107c9829919fdf1d8a81c2d16ac1c5d1f859292dac1a9e71db09f1 |
Hashes for databento_dbn-0.6.0-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 845e30ba440d979528ac8ec5aafdde8998e63e330616169fca8a2bcd80b9f401 |
|
MD5 | a6f72c6e87345d6fcceb9e8c749afd05 |
|
BLAKE2b-256 | 4bdcd5dcccff2d44934f2bfc7c8f6a170401d35dab6a5b7457996136283079a5 |
Hashes for databento_dbn-0.6.0-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46f74ed44a89cbe3993cee17d76d847e9505a80f6f91de281f6498ce120431fa |
|
MD5 | 1df626d7cc3aab06580cf67fe8223600 |
|
BLAKE2b-256 | 65d8e0fcbaf28994ced5e3d265df6b27b24a8f50f60cbc01fb1fbef07862b076 |
Hashes for databento_dbn-0.6.0-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c728682e5e9c18f19928a622f4cb834e1be014ea6861390f216b70bbacce20a4 |
|
MD5 | b759fdd1afa9b2927c820e83f680e4d9 |
|
BLAKE2b-256 | da5ad5562153fc20505e011ff57c75feabeb1bfffe673defd0a8ebf3d117625b |
Hashes for databento_dbn-0.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8666e4c73d874f3f4d83033488b90a4b9260d6e5fab723e06f5916990224d451 |
|
MD5 | dd0271150cb46827a3c704c67c78aba3 |
|
BLAKE2b-256 | 59ff7ad5139250d2d7f50b957ac8fcc365d5457c9925e5ae466a21f0d19fb676 |
Hashes for databento_dbn-0.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35c24c36b11af09af19fdbeecceb6d4c9f75d3112bc424f5ad423f77c42d849f |
|
MD5 | 3d897cc1998e51fc25cf72a397aa35a6 |
|
BLAKE2b-256 | 85e362813e06a86d2ac2ba38b686fbe74b9a7a58652408c221bcab07de66d38f |
Hashes for databento_dbn-0.6.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d6abba33c673458c5c9afe7f1e2b4f1fba9ef258297886cc60be715b778e14b |
|
MD5 | 646540eb24d1070c2b67e6954172a1ca |
|
BLAKE2b-256 | 37eb3cdfc21fbc461d0ed4e517ce6b500b2fab28cb851bfe02964c30b2744240 |
Hashes for databento_dbn-0.6.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2a2d1f4b981f2c2ddcb5b501518e3b55f39f5dde6a6cd075100a73d03a4fcb9 |
|
MD5 | f967c17e6a242bd0076c3311130c376f |
|
BLAKE2b-256 | 72b07024018dde8a69f9153e0576b3adc3582f82c46ae1f7d7be81db48bcfd97 |
Hashes for databento_dbn-0.6.0-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4f2262c142204b8a2935962d0aedc88c345ddcf4677d5d474b23b984ae9b053 |
|
MD5 | 3e7f28f60de7d4fb58c0b7d5a8dc8ab0 |
|
BLAKE2b-256 | ac9c418553613caba221e08b45375403a751966b15c4d8745b71bff03c673965 |
Hashes for databento_dbn-0.6.0-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8543ac002a4ed88a4e6930de92239efdf9e42d529865db6a241a4837f4a032c7 |
|
MD5 | 287d29f48e7321b2b61546eeb24c5265 |
|
BLAKE2b-256 | f4becb914c789af77c7498fa43c2d5741e25de25f30a1b61aaf3a2ea65d14a39 |
Hashes for databento_dbn-0.6.0-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 998d7637455c0e756a124f395cea1641a932c96745dd67ac5d0d4b2f0613d4c2 |
|
MD5 | 0c43062053c065689d223ce400ca2f92 |
|
BLAKE2b-256 | b06ea4e7d40465bda6f8b52e40b05fc14c4999c2247f552e820d723b7ece1920 |
Hashes for databento_dbn-0.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d610f6659f1382f0ca44aeb094a5255aac83ed16dde31aa6bef4333a67c25c6 |
|
MD5 | a8baab6f1b466d2bca77cfe3b9ffbab3 |
|
BLAKE2b-256 | 9cb88d726d4707f00e55824bf9a3ac46f5eb4d1b622ba7db7c48fb5314a50cf0 |
Hashes for databento_dbn-0.6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b972b57b9b95111cc634ef25e27c56feeafde6ee6193481476c7473ecaf7d33 |
|
MD5 | 5c0c1f421ff6aa2e05edd60e2d2da5f6 |
|
BLAKE2b-256 | f0581385086dcedae6a8a69549ab0e27c8a17c7368982e90100efde6199a094e |
Hashes for databento_dbn-0.6.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99f5db454d5c8bd044affcd46f532752ebbe35b2db7a921fc56666c5b2638197 |
|
MD5 | 9bd15017968c7e15143af2720db12e3d |
|
BLAKE2b-256 | 138ceb052baade45d5d9738481cbe6e78147392b8ff4cb665d6d1c735c5837d4 |
Hashes for databento_dbn-0.6.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d61c25e8c0e28ad99d5cc200fe74bc337dfcb8b9527d8314b4a20535d47c0cd |
|
MD5 | fe770fa89bdbc33f5e4ac2b2099ed6bf |
|
BLAKE2b-256 | a7d59d4383072178f8c79dca751b8defe2112cee0c72c233c669de46403c585e |