Python Pachyderm Client
Project description
Python Pachyderm
Official Python Pachyderm client. Created by kalugny (formerly kalugny/pypachy.)
See the API docs. Most of the values are auto-generated from protobufs. It's generally easier to rely on the higher-level classes if they provide the functionality you need:
Installation
pip install python-pachyderm
Usage and options
All of the PFS functions used in pachctl
are supported (almost) as-is.
There are some helper functions that help make things more pythonic:
commit
which is a context manager wrapper forstart_commit
andfinish_commit
get_files
which supports getting the data from multiple files
Naming commits
All functions that accept a commit
argument will accept a tuple of (repo, branch)
or (repo, commit_id)
,
a string like repo/branch
or repo/commit_id
and a Commit object.
e.g:
client.list_file(('my_repo', 'branch'), '/') # tuple
client.list_file('my_repo/commit_id', '/') # string
c = client.list_commit('my_repo')[0] # get some commit
client.list_file(c, '/') # and use it directly
Basic usage example
import python_pachyderm
client = python_pachyderm.PfsClient()
client.create_repo('test')
with client.commit('test', 'master') as c:
client.put_file_bytes(c, '/dir_a/data', b'DATA')
client.put_file_url(c, '/dir_b/icon.png', 'http://www.pearl-guide.com/forum/images/smilies/biggrin.png')
client.get_files('test/master', '/', recursive=True)
As of version 0.1.4, there is also limited support for PPS:
pps_client = python_pachyderm.PpsClient()
pps_client.list_pipeline()
...
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.
Getting started
To run tests, clone the repo, then run:
make init
tox
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
Hashes for python-pachyderm-1.9.0rc3.post3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac59670777e3ec74d88b4eb5d2eba00d8d8eaf0a35e2af26362cf9e8a945af42 |
|
MD5 | 98d086fdeb79d793ed91cd12867697a0 |
|
BLAKE2b-256 | 1a2208780678aef73a39cb8147ef6ca4294a8a2998ee8674b5d86512764f0269 |