Giter Site home page Giter Site logo

perkeeppy's Introduction

Build Status

perkeeppy

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.

Background

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.

Installation

Install with pip:

$ pip install .

Usage

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

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.

Project

You can find the project repository at github.com/DeeUnderscore/perkeeppy.

This library is licensed under the MIT license. For details, see LICENSE.

Links

perkeeppy's People

Contributors

apparentlymart avatar daymien avatar deeunderscore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

daymien xyb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.