Commit 2c0d3f88 authored by Łukasz Nowak's avatar Łukasz Nowak

Direct to file, as this is for programmers.

Indeed, some day documentation shall be written, as soon as API will be defined.
parent 1f60809d
Introduction
==============
============
The goal of libnetworkcache python library is to abstract the HTTP calls.
It works as wrapper of python httplib to use the Networkcache HTTP Server.
......@@ -8,31 +8,15 @@ The Networkcache HTTP Server are sub-divided into two Web services:
- SHADIR
SHACACHE
===========
========
It is a simple HTTP Server used to cache files.
SHADIR
=======
======
It is a simple HTTP Server used to cache information, working like a directory.
API
======
__init__(shacahe, shadir)
urls for shacache and shadir.
upload(file, directory_key=None, **kw)
''' Upload the file to ShaCache Server'''
If directory_key is not None, upload add a new key to the shadir server.
download(sha)
'''Download a file from shacache
Raise FileNotFound if file is not found
'''
select(directory_key)
'''Download a file from shacache by selecting the entry in shadir
Raise DirectoryNotFound if multiple files are found
'''
Please see slapos/libnetworkcache.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment