Skip to main content

Python binding for delta-rs

Project description

Deltalake-python

PyPI

Native Delta Lake binding for Python based on delta-rs.

Installation

pip install deltalake

NOTE: official binary wheels are linked against openssl statically for remote objection store communication. Please file Github issue to request for critical openssl upgrade.

Usage

Resolve partitions for current version of the DeltaTable:

>>> from deltalake import DeltaTable
>>> dt = DeltaTable("../rust/tests/data/delta-0.2.0")
>>> dt.version()
3
>>> dt.files()
['part-00000-cb6b150b-30b8-4662-ad28-ff32ddab96d2-c000.snappy.parquet', 'part-00000-7c2deba3-1994-4fb8-bc07-d46c948aa415-c000.snappy.parquet', 'part-00001-c373a5bd-85f0-4758-815e-7eb62007a15c-c000.snappy.parquet']

Convert DeltaTable into PyArrow Table and Pandas Dataframe:

>>> from deltalake import DeltaTable
>>> dt = DeltaTable("../rust/tests/data/simple_table")
>>> df = dt.to_pyarrow_table().to_pandas()
>>> df
   id
0   5
1   7
2   9
>>> df[df['id'] > 5]
   id
1   7
2   9

Time travel:

>>> from deltalake import DeltaTable
>>> dt = DeltaTable("../rust/tests/data/simple_table")
>>> dt.load_version(2)
>>> dt.to_pyarrow_table().to_pandas()
   id
0   5
1   7
2   9
3   5
4   6
5   7
6   8
7   9

Develop

maturin is used to build the python package.

To install development version of the package into your current Python environment:

$ maturin develop

Build manylinux wheels

docker run -e PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig -it -v `pwd`:/io apache/arrow-dev:amd64-centos-6.10-python-manylinux2010 bash
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustup default stable
cargo install --git https://github.com/PyO3/maturin.git --rev 98636cea89c328b3eba4ebb548124f75c8018200 maturin
cd /io/python
export PATH=/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:$PATH
maturin publish -b pyo3 --target x86_64-unknown-linux-gnu --no-sdist

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 Distributions

deltalake-0.1.2-cp39-none-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.9 Windows x86-64

deltalake-0.1.2-cp39-cp39-macosx_10_7_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

deltalake-0.1.2-cp38-none-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.8 Windows x86-64

deltalake-0.1.2-cp38-cp38-macosx_10_7_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.8 macOS 10.7+ x86-64

deltalake-0.1.2-cp37-none-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.7 Windows x86-64

deltalake-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.7m macOS 10.7+ x86-64

deltalake-0.1.2-cp36-none-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.6 Windows x86-64

deltalake-0.1.2-cp36-cp36m-macosx_10_7_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.6m macOS 10.7+ x86-64

File details

Details for the file deltalake-0.1.2-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for deltalake-0.1.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 7e73b89a9605387f13cff0c219d3114fdc622866c2064b11a0a5a67284eb4225
MD5 1ab2739d6074ecae1fcb9283a9a61c81
BLAKE2b-256 53a524ceedde9e90a832e07e1f4eecfbf0a7c7f6945c1c562bad8b21fba543de

See more details on using hashes here.

Provenance

File details

Details for the file deltalake-0.1.2-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for deltalake-0.1.2-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 74ff864cc7f6e8f0e636ee701616deacc9c5d5490c0f7e79f358e81863340815
MD5 d13a095003c6bc6154bb88fdae08c7be
BLAKE2b-256 91d67f9bbb841e0734301cbee235309f45317a1a6656a752b6c8c28db12b2a76

See more details on using hashes here.

Provenance

File details

Details for the file deltalake-0.1.2-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for deltalake-0.1.2-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 0a96be37e21a08b751de4683a1b7cbf35abc2c74c34b44dab44de1862073ed4e
MD5 07e831f4a9c0601f333cddbdae577f48
BLAKE2b-256 c3c70bf163282b2c7ec5aaa0bc9db4dfad154155e9e210cf6e8c442cea5e3da3

See more details on using hashes here.

Provenance

File details

Details for the file deltalake-0.1.2-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for deltalake-0.1.2-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 cc58d6a4cba3340de445929a3c827030edfb309fe37ec04776b5862cc8f1cb38
MD5 6e89ce576816beafb5524e0b7bd37c97
BLAKE2b-256 751920e2ac90bf8141f9fc26b9bf55ed9231fd9f898e88e3d1179232556fff7e

See more details on using hashes here.

Provenance

File details

Details for the file deltalake-0.1.2-cp37-none-win_amd64.whl.

File metadata

File hashes

Hashes for deltalake-0.1.2-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 c94316157e23c9903b21cb236df3cdcb13edd99899fdd954304d624ca6941adf
MD5 d582f49c5d6afb1e50dd27035efe5751
BLAKE2b-256 2eceb045e8d4b3135b90bec978ccf19b5c31639970fe5a2da8df84e1044a9c6d

See more details on using hashes here.

Provenance

File details

Details for the file deltalake-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for deltalake-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 368074cb9b1b0b2d133ff861cebc8460037db720b8d0096c354eaab79b44d9be
MD5 cee24b04598f1790766d45a9f23c6bd2
BLAKE2b-256 18bf85dec4caa7dc6d914ca8599d615eac86e32c82a8673fa3840a47349a4c6f

See more details on using hashes here.

Provenance

File details

Details for the file deltalake-0.1.2-cp36-none-win_amd64.whl.

File metadata

File hashes

Hashes for deltalake-0.1.2-cp36-none-win_amd64.whl
Algorithm Hash digest
SHA256 c4e20c89a8f32ae938b0e91d22a29ee20fcc82fb86265142ee3c3c00bc1d639b
MD5 4c5021c07cb4e383a4e8404be1436c79
BLAKE2b-256 33d3ce3635f9382c5a9f6ff77cbdbd14c9657f871b88efdbf7abe6151c25827b

See more details on using hashes here.

Provenance

File details

Details for the file deltalake-0.1.2-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for deltalake-0.1.2-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 5b412f35942e2dd582fe5c4a173ef4185b2079e892509220a6340017b4719eeb
MD5 9f59962679b599084391666a8c391816
BLAKE2b-256 63df0247e7cc29077a00f0551f5357fe552e2aeaecb4e125c2182692bc1b66b6

See more details on using hashes here.

Provenance

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