Python Pachyderm Client
Project description
Python Pachyderm
Official Python Pachyderm client.
This library provides the autogenerated gRPC/protobuf code for Pachyderm, along with a higher-level and more pythonic Client
class.
See the API docs.
Installation
pip install python-pachyderm
A Small Taste
Here's an example that creates a repo and adds a file:
import python_pachyderm
# Connects to a pachyderm cluster on localhost:30650.
# For other options, see the API docs.
client = python_pachyderm.Client()
# Create a pachyderm repo called `test`
client.create_repo("test")
# Create a file in `(repo="test", branch="master")` at `/dir_a/data.txt`
# Similar to `pachctl put file test@master:/dir_a/data.txt`
with client.commit("test", "master") as commit:
client.put_file_bytes(commit, "/dir_a/data.txt", b"DATA")
# Get back the file
f = client.get_file(("test", "master"), "/dir_a/data.txt")
print(f.read()) # >>> b"DATA"
How to load a CSV file into a Pandas dataframe
import pandas as pd
f = client.get_file(("my_repo", "my_branch"), "/path_to/my_data.csv")
df = pd.read_csv(f)
For more sophisticated examples, see the examples directory.
Versioning
Prior to python-pachyderm 2.0, this library's versioning synced with pachyderm's core versioning; e.g. version 1.8.5 of this library synced with 1.8.5 of pachyderm core. python-pachyderm 2.0 onwards uses semver instead, so versions are not tied to pachyderm core. This was done for two reasons:
- Sometimes this library makes breaking or backwards-incompatible changes, which aren't properly conveyed by revision changes.
- Pachyderm core is stable enough that most features of this library will work for disparate versions of pachyderm clusters. To help ensure this, this library's CI tests against several versions of pachyderm core.
However, if for whatever reason you need to know which version of pachyderm core a version of python-pachyderm was built with, consult CHANGELOG.md
. As a broad rule of thumb, we recommend working with the latest version of both pachyderm core and python-pachyderm where possible.
Contributing
This driver is co-maintained by Pachyderm and the community. If you're looking to contribute to the project, this is a fantastic place to get involved. Take a look at the contributing guide for more info (including testing instructions).
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 Distribution
Built Distribution
Hashes for python-pachyderm-7.4.0rc1.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71e4d13080f7cfd2e936da4ca7b9706c519c797a1636a7719f449800ced61d7f |
|
MD5 | 868b4452532fedc8dff64d262e6f4b53 |
|
BLAKE2b-256 | 0ab9cba37ae8438aa6d04674c4b870f2210bec5e39e05506f84d0f695e535d4d |
Hashes for python_pachyderm-7.4.0rc1.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e80c181389f05a0364023c2a531474c76be0d9e5d8158c4abea039f740696f6 |
|
MD5 | 2c5ef043a67e7a18ceae22c59cf73726 |
|
BLAKE2b-256 | 4089be6f327c5016654b9faea28e780d3560830035fcfacfd65268b0941db253 |