A library for reading Qlik Sense .qvd file format from Python, written in Rust.
Project description
Read Qlik Sense .qvd files 🛠
A python library for reading Qlik Sense .qvd file format, written in Rust. Files can be read to DataFrame or dictionary.
Install
Install from PyPi https://pypi.org/project/qvd/
pip install qvd
Usage
from qvd import qvd_reader
df = reader.read('test.qvd')
print(df)
Developing
Create a virtual env https://docs.python-guide.org/dev/virtualenvs/ and activate it.
Install pandas via pip Install maturin via pip
run maturin develop --release
to install the generated python lib to the virtual env.
Test
Run cargo test
to run rust unit tests.
Run pytest test_qvd_reader.py
to test python lib.
QVD File Structure
A QVD file is split into 3 parts; XML Metdata, Symbols table and the bit stuffed binary indexes.
XML Metadata
This section is at the top of the file and is in human readable XML. This section contains metadata about the file in gneneral such as table name, number of records, size of records as well as data about individual fields including field name, length offset in symbol table.
Symbol table
Directly after the xml section is the symbol table. This is a table of every unique value contained within each column. The columns are in the order described in the metadata fields section. In the metadata we can find the byte offset from the start of the symbols section for each column. Symbol types cannot be determined from the metadata and are instead determined by a flag byte preceding each symbol. These types are:
- 1 - 4 byte signed int (u32) - little endiand
- 2 - 8 byte signed float (f64) - little endian
- 4 - null terminated string
- 5 - 4 bytes of junk follwed by a null terminated string representing an integer
- 6 - 8 bytes of junk followed by a null terminated string representing a float
Binary Indexes
After the symbol table are the binary indexes that map to the symbols for each row. They are bit stuffed and reversed binary numbers that point to the index of the symbol in the symbols table for each field.
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 qvd-0.0.7-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b895456db51c91e3faae5635ddc666e2fa7f93da3190e70093561546ceb7446f |
|
MD5 | ab58bb9541ce5650f78a20157fe68b76 |
|
BLAKE2b-256 | 0b4981eef9097cd2717ad355fa833a7bd777d81a49f6c0fdf6daf8365e749574 |
Hashes for qvd-0.0.7-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 405b46b9780958df428a93ff8129ef56ce1b16915eaadd62a8b98c766c89739a |
|
MD5 | bf263e6960c2c792375fff2d85799732 |
|
BLAKE2b-256 | 249f0ca2e9385da5e64310c0dd097c05f6afed6aca795cd8f297556f9eb3faec |
Hashes for qvd-0.0.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b69569790bd4506d3d23ee04d7f43358b64bef685e69ccfa0a90c163e50a1fff |
|
MD5 | aed45ae1c9b06ef58c14c803cab37174 |
|
BLAKE2b-256 | 84821e2cdb45a99f4ad72c191f95d4511b6c5c654af55f4653bb5f5841363fe2 |
Hashes for qvd-0.0.7-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3940911220cff20ed28ac78b28a7cc0c440809b3c45eeab10b5ab5fe7a00e5f7 |
|
MD5 | 356b60cdd3615a410803613e200a9d42 |
|
BLAKE2b-256 | 3ed0f047068634f3a7b8ae40d6915cd0a35ecc32500fba0770d5aee63ba935c0 |
Hashes for qvd-0.0.7-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ddea9743f7ab718782f3b616832cd71e7e864cfd5e5cb6fa67c2716e56fa81f |
|
MD5 | 80dcd9301a0179a21650c17aa5a81860 |
|
BLAKE2b-256 | defd782fe38a1ab394f728773becb4fea46adec64c608b1e9c453588a9ad6590 |
Hashes for qvd-0.0.7-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 546c53449694e98924eb73896f25e7d271ac3b758eb5bdc98b938c4e5a971fae |
|
MD5 | d8328489b283a90636cd7fd9dd595db5 |
|
BLAKE2b-256 | 6f6b31e94122b6b6daedb7eadcbda7bd574ecdf362113e24e72e7e8fa802a9cb |
Hashes for qvd-0.0.7-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7ef517d61471a78234691fc7b0984d643e396a6bee082de776edebcf58e554a |
|
MD5 | 07e1bc66c1d2b039c91233cd65b53ea7 |
|
BLAKE2b-256 | 2152961e57e173f03ffb058c20cd45265d1932b600ecd26c760703e7b0f49284 |
Hashes for qvd-0.0.7-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1563a489a47a2e55d45ae5668710f10be32ac5b691afa865763ce6e8119a9e68 |
|
MD5 | d7ff50c6c86017ed4a06d640b0d43c83 |
|
BLAKE2b-256 | 030d9eb50cc8c351cc00fe3fb8d401a2e50e75d8770c8a7dc2d1fc90f4a63577 |
Hashes for qvd-0.0.7-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4283b5c3719f634b77ab91715294e31aba4b053695ae06f1fc6344ff796d387 |
|
MD5 | b6716c824469f4dd313ac925d5b0a15e |
|
BLAKE2b-256 | 28fe56367f14bab84a59fc5e7958ceff45aa3876c16e40dfe66ac2cf4f0db575 |
Hashes for qvd-0.0.7-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4455e4337b7da36f433ab8a78f737a55b1be7bc7af29abd41ec3f417e35e6dfe |
|
MD5 | cc3d1dc784f6ea06bb3ac9cca670b2d0 |
|
BLAKE2b-256 | 83aa78e116b8f48f07059650d85e34f014a06888c0ca091467bbcb2f293bb285 |