A Connector to swift that manage authentication and errors catching
Method __init__ Initialize a SwiftConnector
Method swift_auth_v1 Undocumented
Method swift_auth_v2 Undocumented
Method test_root_exists Check that Swift container exist
Method create_root Create the Swift container
Method get_container_objects Retrieve objects list in a container
Method get_object_stat Retrieve object stat
Method put_object Put an object
Method get_object Retrieve an object
Method del_object Delete an object
Method del_root Delete the root container by removing container content
def __init__(self, root, conf):
Initialize a SwiftConnector
ParametersrootThe swift container that will act as Git bare repository
confA ConfigParser Object
def swift_auth_v1(self):
Undocumented
def swift_auth_v2(self):
Undocumented
def test_root_exists(self):
Check that Swift container exist
ReturnsTrue if exist or None it not
def create_root(self):
Create the Swift container
RaisesSwiftException if unable to create
def get_container_objects(self):
Retrieve objects list in a container
ReturnsA list of dict that describe objects or None if container does not exist
def get_object_stat(self, name):
Retrieve object stat
ParametersnameThe object name
ReturnsA dict that describe the object or None if object does not exist
def put_object(self, name, content):
Put an object
ParametersnameThe object name
contentA file object
RaisesSwiftException if unable to create
def get_object(self, name, range=None):
Retrieve an object
ParametersnameThe object name
rangeA string range like "0-10" to retrieve specified bytes in object content
ReturnsA file like instance or bytestring if range is specified
def del_object(self, name):
Delete an object
ParametersnameThe object name
RaisesSwiftException if unable to delete
def del_root(self):
Delete the root container by removing container content
RaisesSwiftException if unable to delete
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.