Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/objstorage/objstorage.py
# Copyright (C) 2015-2016 The Software Heritage developers | # Copyright (C) 2015-2016 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
ID_HASH_ALGO = 'sha1' | |||||
olasd: That should be 40 ! :) | |||||
Done Inline ActionsWoops! Thats better indeed. qcampos: Woops! Thats better indeed. | |||||
class ObjStorage(): | class ObjStorage(): | ||||
""" High-level API to manipulate the Software Heritage object storage. | """ High-level API to manipulate the Software Heritage object storage. | ||||
Conceptually, the object storage offers 5 methods: | Conceptually, the object storage offers 5 methods: | ||||
- __contains__() check if an object is present, by object id | - __contains__() check if an object is present, by object id | ||||
- add() add a new object, returning an object id | - add() add a new object, returning an object id | ||||
- restore() same as add() but erase an already existed content | - restore() same as add() but erase an already existed content | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |
That should be 40 ! :)