perkeeppy is a library for interacting with the HTTP API of a Perkeep server from Python 3.
This library provides an interface for interacting with API endpoints that the Perkeep (previously called Camlistore) daemon exposes. It supports the basic operations, such as put/get, as well as some higher level APIs, such as the signing helper.
This library is based on the earlier work of Martin Atkins – the camlistore (repository) library. perkeeppy updates the original library to Python 3. It also adds extra functionality for uploading schema blobs, using the signing endpoint, and using the unofficial upload helper.
Install with pip
:
$ pip install .
Generally, you will want to obtain a connection first. Currently, only localhost authentication is supported.
import perkeeppy
conn = perkeeppy.connect('http://localhost:3179') # Use the base URL for the Perkeep server
my_blob = perkeeppy.Blob(b'Hello, world!') # Blobs carry bytes
blobref = conn.blobs.put(my_blob)
received_blob = conn.blobs.get(blobref)
print(f'{received_blob.blobref}: {received_blob.data.decode()}')
Documentation uses Sphinx. You can have setup.py
build it:
$ python setup.py build_sphinx
The rendered HTML files will be in docs/build/html
, with the index at docs/build/html/index.html
.
You can find the project repository at github.com/DeeUnderscore/perkeeppy.
This library is licensed under the MIT license. For details, see LICENSE.
- Constraints: https://perkeep.org/pkg/search#Constraint
- Permanodes Attributes: https://perkeep.org/doc/schema/permanode#attributes