Skip to main content

Tree hash-storage for files

Project description


.. image::
:alt: Build status

.. image::
:alt: Documentation


Tree the library for saving a large number of files.
For preservation it is enough to you to transfer a binary code of the file and the Tree will keep him.


Superficial uses in the tree hash storage
from tree.tree import TreeStorage
from tree.config import TreeConfig

# Initialize config for the TreeStorage
config = TreeConfig({
"PATH_TO_TREE": "/path/to/storage"

tree = TreeStorage(config)

# If you want add file to the Tree Storage
with open("/path/to/file", "rb") as file:
tree.breed(, mode='wb')
# after add file, method return status of writing.
# If add file status is success, tree save last
# hash of the file in the attribute file_hash_name

# For remove file from the Tree Storage
# you can call cut method and past
# to him hash name of file which you have delete
tree.cut(file_hash_name=tree.file_hash_name, greedy=True)


.. image::
:alt: Python Version

.. image::
:alt: Project Version

PyPy and PyPy3 are also supported (and tested against).

Download and install the latest released version from PyPI:
pip install tree-storage

Download and install the development version from GitHub:
pip install git+

Installing from source (installs the version in the current working directory):
python install

(In all cases, add --user to the install command to install in the current user's home directory.)
Install and Update Tree library using pip:


Read full documentation on ` <>`_.


This repository is distributed under The MIT license

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tree-storage, version 0.0.12
Filename, size File type Python version Upload date Hashes
Filename, size tree_storage-0.0.12-py2.py3-none-any.whl (7.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size tree_storage-0.0.12-py3-none-any.whl (6.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size tree-storage-0.0.12.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page