PyPachy
=======

A python client wrapper for *Pachyderm* <https://www.pachyderm.io/> API.

*NOTES*
1. Currently implements only the PFS interface.
2. Supports Pachyderm versions 1.4 and up


Installing
----------

```bash
    $ pip install pypachy
```

Instructions
------------
The functions correspond closely to the Go client implementation and are very similar to the
``pachctl`` interface as well.

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

Basic usage example:

```python
    >>> import pypachy
    
    >>> client = pypachy.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)
    {'/dir_a/data': b'DATA',
     '/dir_b/icon.png': b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\xc9e<\x00\x00\x02\xbfIDATx\xda\xa4\x92KHTa\x14\xc7\xff\xdf\xbd\xde\xb9\x8eskt(\x99|T\xea\xb4QP[\xe4"\x02\x95\xca\x1en\xb2\x88 r\xe16h\x91\xb4r\x11\xd8N\x82@jW"T\x1bCz,\xa4\x89\x92\xac(A\xb4PJQ&L\x85\xb1$u\x1e\xb7\xeb\xdc\xe7\xd7\xf9\xa62\xb5e\x17\x0e\xdf\xf9.\xdf\xf9\x9d\xffy0\xce9\xfe\xe7\xcb\xd9\xfa\xc3\xeee\x9a\xe7\xa1\x9d\xbb8\xee\xba\xa8#\x1f\xe4\x8f\x90\x1f\xa5\xf3F\xe8\n\xd77\xbeg\x1b\x15Pp\xbd\xe7\xa2W\xaan(c\xe1\x06p\x7f\t\xe09\xf0\xd2sp\xe2\xc30\x86\x87f\t\xd4\x16\xee\x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\xdb\xe8\x0c]>\xe44\x9e\xab\xe4\x9d\xc5\xc7\x1a\x8a\xfc\xa5\xb5\x90U\xea\x93k\xd1ZP\x03\xa7\xa70\xd1?\x14\x7f\xfc\x85u\xde\x9f\x94\x07I\xfe2Y\x82\x8c\xf9\t\xb0\x8f6R\x11[\x19\xf4{y]\x8d^ky>\x0ej>T\x89M\xfe\x96\xc6\xa7\xe9e\xbc\xeb\x1ae\xf7tK2D\xedd.\xd9G\xa1@#G\x96$I#\x9fv\x11*\x81\xc4\x8a\xab\xbf\xc6\xcf\xc5c\xe1\x9a\xbf\x83\x04\xe0\xc7\xef\xec\xceO\x01\x06\x00\xce\xbcbi2/%\xbd\x00\x00\x00\x00IEND\xaeB`\x82'}
```

TODO
====
* Test, test, test!
* Add support for ``ObjectAPI``
* Add support for ``PPS``, ``Version``, etc
