il2_rest/client.py
def documents_begin_transaction(self, comment=None, compression=None, generatePublicDirectory=None, iterations=None, encryption=None, password=None, model=None) :
        """
        Begin a transaction to store a set of documents. May rollback on timeout or errors.
        
        Args:
            comment (:obj:`str`): Any additional information about the set of documents to be stored.
            compression (:obj:`il2_rest.enumerations.DocumentsCompression`): Compression algorithm.
                The compression algorithm can be as follows:\n
                - NONE: No compression. Simply store the bytes;\n
                - GZIP: Compression of the data using the gzip standard;\n
                - BROTLI: Compression of the data using the brotli standard;\n
                - ZSTD: Compression of the data using the ZStandard from Facebook (In the future).
            generatePublicDirectory (:obj:`bool`): If the publically viewable PublicDirectory field should be created.
            iterations (:obj:`int`): Override for the number of PBE iterations to generate the key.
            encryption (:obj:`str`): The encryption descriptor in the <pbe>-<hash>-<cipher>-<level> format
                Examples:\n
                - "PBKDF2-SHA256-AES256-LOW" 
                - "PBKDF2-SHA512-AES256-MID"
                - "PBKDF2-SHA256-AES128-HIGH"
            password (:obj:`bytes`): Password as bytes if Encryption is not null.
            model (:obj:`il2_rest.models.DocumentsBeginTransactionModel`, optional): 
        
        Returns:
            :obj:`il2_rest.models.DocumentsTransactionModel`: Started transaction identifier and limits.
        
        Examples:
            Begin transaction using a :obj:`il2_rest.models.DocumentsBeginTransactionModel`:
            
            >>> from il2_rest.models import DocumentsBeginTransactionModel
            >>> node = RestNode(cert_file='documenter.pfx', cert_pass='password')
            >>> chain = node.chain_by_id('A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK-iDKE')
            >>> model = DocumentsBeginTransactionModel(chain='EbAfcWGwCwzuiEtSwIwYQYIHy-g05CZl6jrcBAYuYRI', 
            ...                                        comment='Using model')
            >>> resp = chain.documents_transaction_metadata('EbAfcWGwCwzuiEtSwIwYQYIHy-g05CZl6jrcBAYuYRIe')
            >>> print(resp)

            The same can be done passing all the information as parameters:
            
            >>> node = RestNode(cert_file='documenter.pfx', cert_pass='password')
            >>> chain = node.chain_by_id('A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK-iDKE')
            >>> resp = chain.documents_begin_transaction(comment='Using parameters')
            >>> print(resp)


        """
        if model :
            #if not isinstance(model, DocumentsBeginTransactionModel) :
            #    raise TypeError('model must be DocumentsBeginTransactionModel')
            if model.chain != self.id :
                raise TypeError(f"self.id == '{self.id}' does not match model.chain == '{model.chain}'")
        else :
            model = DocumentsBeginTransactionModel(chain=self.id, comment=comment, encryption=encryption, compression=compression, generatePublicDirectory=generatePublicDirectory, iterations=iterations, password=password)
        return DocumentsTransactionModel.from_json(self.__rest._post("/documents/transaction", model))

        Begin a transaction to store a set of documents. May rollback on timeout or errors.
        
        Args:
            comment (:obj:`str`): Any additional information about the set of documents to be stored.
            compression (:obj:`il2_rest.enumerations.DocumentsCompression`): Compression algorithm.
                The compression algorithm can be as follows:\n
                - NONE: No compression. Simply store the bytes;\n
                - GZIP: Compression of the data using the gzip standard;\n
                - BROTLI: Compression of the data using the brotli standard;\n
                - ZSTD: Compression of the data using the ZStandard from Facebook (In the future).
            generatePublicDirectory (:obj:`bool`): If the publically viewable PublicDirectory field should be created.
            iterations (:obj:`int`): Override for the number of PBE iterations to generate the key.
            encryption (:obj:`str`): The encryption descriptor in the <pbe>-<hash>-<cipher>-<level> format
                Examples:\n
                - "PBKDF2-SHA256-AES256-LOW" 
                - "PBKDF2-SHA512-AES256-MID"
                - "PBKDF2-SHA256-AES128-HIGH"
            password (:obj:`bytes`): Password as bytes if Encryption is not null.
            model (:obj:`il2_rest.models.DocumentsBeginTransactionModel`, optional): 
        
        Returns:
            :obj:`il2_rest.models.DocumentsTransactionModel`: Started transaction identifier and limits.
        
        Examples:
            Begin transaction using a :obj:`il2_rest.models.DocumentsBeginTransactionModel`:
            
            >>> from il2_rest.models import DocumentsBeginTransactionModel
            >>> node = RestNode(cert_file='documenter.pfx', cert_pass='password')
            >>> chain = node.chain_by_id('A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK-iDKE')
            >>> model = DocumentsBeginTransactionModel(chain='EbAfcWGwCwzuiEtSwIwYQYIHy-g05CZl6jrcBAYuYRI', 
            ...                                        comment='Using model')
            >>> resp = chain.documents_transaction_metadata('EbAfcWGwCwzuiEtSwIwYQYIHy-g05CZl6jrcBAYuYRIe')
            >>> print(resp)

            The same can be done passing all the information as parameters:
            
            >>> node = RestNode(cert_file='documenter.pfx', cert_pass='password')
            >>> chain = node.chain_by_id('A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK-iDKE')
            >>> resp = chain.documents_begin_transaction(comment='Using parameters')
            >>> print(resp)


        
Begin a transaction to store a set of documents. May rollback on timeout or errors.
Begin a transaction to store a set of documents . May rollback on timeout or errors .
def documents_begin_transaction(self, comment=None, compression=None, generatePublicDirectory=None, iterations=None, encryption=None, password=None, model=None) :
        if model :
            if model.chain != self.id :
                raise TypeError(f"self.id == '{self.id}' does not match model.chain == '{model.chain}'")
        else :
            model = DocumentsBeginTransactionModel(chain=self.id, comment=comment, encryption=encryption, compression=compression, generatePublicDirectory=generatePublicDirectory, iterations=iterations, password=password)
        return DocumentsTransactionModel.from_json(self.__rest._post("/documents/transaction", model))
def documents_begin_transaction ( self , comment = None , compression = None , generatePublicDirectory = None , iterations = None , encryption = None , password = None , model = None ) : if model : if model . chain != self . id : raise TypeError ( f"self.id == '{self.id}' does not match model.chain == '{model.chain}'" ) else : model = DocumentsBeginTransactionModel ( chain = self . id , comment = comment , encryption = encryption , compression = compression , generatePublicDirectory = generatePublicDirectory , iterations = iterations , password = password ) return DocumentsTransactionModel . from_json ( self . __rest . _post ( "/documents/transaction" , model ) )
Begin a transaction to store a set of documents.
Begin a transaction to store a set of documents .
"""
        Begin a transaction to store a set of documents. May rollback on timeout or errors.
        
        Args:
            comment (:obj:`str`): Any additional information about the set of documents to be stored.
            compression (:obj:`il2_rest.enumerations.DocumentsCompression`): Compression algorithm.
                The compression algorithm can be as follows:\n
                - NONE: No compression. Simply store the bytes;\n
                - GZIP: Compression of the data using the gzip standard;\n
                - BROTLI: Compression of the data using the brotli standard;\n
                - ZSTD: Compression of the data using the ZStandard from Facebook (In the future).
            generatePublicDirectory (:obj:`bool`): If the publically viewable PublicDirectory field should be created.
            iterations (:obj:`int`): Override for the number of PBE iterations to generate the key.
            encryption (:obj:`str`): The encryption descriptor in the <pbe>-<hash>-<cipher>-<level> format
                Examples:\n
                - "PBKDF2-SHA256-AES256-LOW" 
                - "PBKDF2-SHA512-AES256-MID"
                - "PBKDF2-SHA256-AES128-HIGH"
            password (:obj:`bytes`): Password as bytes if Encryption is not null.
            model (:obj:`il2_rest.models.DocumentsBeginTransactionModel`, optional): 
        
        Returns:
            :obj:`il2_rest.models.DocumentsTransactionModel`: Started transaction identifier and limits.
        
        Examples:
            Begin transaction using a :obj:`il2_rest.models.DocumentsBeginTransactionModel`:
            
            >>> from il2_rest.models import DocumentsBeginTransactionModel
            >>> node = RestNode(cert_file='documenter.pfx', cert_pass='password')
            >>> chain = node.chain_by_id('A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK-iDKE')
            >>> model = DocumentsBeginTransactionModel(chain='EbAfcWGwCwzuiEtSwIwYQYIHy-g05CZl6jrcBAYuYRI', 
            ...                                        comment='Using model')
            >>> resp = chain.documents_transaction_metadata('EbAfcWGwCwzuiEtSwIwYQYIHy-g05CZl6jrcBAYuYRIe')
            >>> print(resp)

            The same can be done passing all the information as parameters:
            
            >>> node = RestNode(cert_file='documenter.pfx', cert_pass='password')
            >>> chain = node.chain_by_id('A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK-iDKE')
            >>> resp = chain.documents_begin_transaction(comment='Using parameters')
            >>> print(resp)


        """ #if not isinstance(model, DocumentsBeginTransactionModel) : #    raise TypeError('model must be DocumentsBeginTransactionModel')
:obj:`il2_rest.models.DocumentsTransactionModel`: Started transaction identifier and limits.
: obj : ` il2_rest . models . DocumentsTransactionModel ` : Started transaction identifier and limits .
self
comment
compression
generatePublicDirectory
iterations
encryption
password
model
comment (
`str`): Any additional information about the set of documents to be stored.
` str ` ) : Any additional information about the set of documents to be stored .
compression (
`il2_rest.enumerations.DocumentsCompression`): Compression algorithm.
The compression algorithm can be as follows:\n
NONE: No compression. Simply store the bytes;\n
GZIP: Compression of the data using the gzip standard;\n
BROTLI: Compression of the data using the brotli standard;\n
ZSTD: Compression of the data using the ZStandard from Facebook (In the future).
` il2_rest . enumerations . DocumentsCompression ` ) : Compression algorithm . The compression algorithm can be as follows : \ n NONE : No compression . Simply store the bytes ; \ n GZIP : Compression of the data using the gzip standard ; \ n BROTLI : Compression of the data using the brotli standard ; \ n ZSTD : Compression of the data using the ZStandard from Facebook ( In the future ) .
generatePublicDirectory (
`bool`): If the publically viewable PublicDirectory field should be created.
` bool ` ) : If the publically viewable PublicDirectory field should be created .
iterations (
`int`): Override for the number of PBE iterations to generate the key.
` int ` ) : Override for the number of PBE iterations to generate the key .
encryption (
`str`): The encryption descriptor in the --- format
Examples:\n
"PBKDF2-SHA256-AES256-LOW"
"PBKDF2-SHA512-AES256-MID"
"PBKDF2-SHA256-AES128-HIGH"
` str ` ) : The encryption descriptor in the --- format Examples : \ n " PBKDF2 - SHA256 - AES256 - LOW " " PBKDF2 - SHA512 - AES256 - MID " " PBKDF2 - SHA256 - AES128 - HIGH "
password (
`bytes`): Password as bytes if Encryption is not null.
` bytes ` ) : Password as bytes if Encryption is not null .
model (
None
examples
Begin transaction using a :obj:`il2_rest.models.DocumentsBeginTransactionModel`.

>>> from il2_rest.models import DocumentsBeginTransactionModel
>>> node = RestNode(cert_file='documenter.pfx', cert_pass='password')
>>> chain = node.chain_by_id('A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK-iDKE')
>>> model = DocumentsBeginTransactionModel(chain='EbAfcWGwCwzuiEtSwIwYQYIHy-g05CZl6jrcBAYuYRI',
comment='Using model')
>>> resp = chain.documents_transaction_metadata('EbAfcWGwCwzuiEtSwIwYQYIHy-g05CZl6jrcBAYuYRIe')
>>> print(resp)

The same can be done passing all the information as parameters.

>>> node = RestNode(cert_file='documenter.pfx', cert_pass='password')
>>> chain = node.chain_by_id('A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK-iDKE')
>>> resp = chain.documents_begin_transaction(comment='Using parameters')
>>> print(resp)
Begin transaction using a : obj : ` il2_rest . models . DocumentsBeginTransactionModel ` . >>> from il2_rest . models import DocumentsBeginTransactionModel >>> node = RestNode ( cert_file = ' documenter . pfx ' cert_pass = ' password ' ) >>> chain = node . chain_by_id ( ' A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK - iDKE ' ) >>> model = DocumentsBeginTransactionModel ( chain = ' EbAfcWGwCwzuiEtSwIwYQYIHy - g05CZl6jrcBAYuYRI ' comment = ' Using model ' ) >>> resp = chain . documents_transaction_metadata ( ' EbAfcWGwCwzuiEtSwIwYQYIHy - g05CZl6jrcBAYuYRIe ' ) >>> print ( resp ) The same can be done passing all the information as parameters . >>> node = RestNode ( cert_file = ' documenter . pfx ' cert_pass = ' password ' ) >>> chain = node . chain_by_id ( ' A1wCG9hHhuVNb8hyOALHokYsWyTumHU0vRxtcK - iDKE ' ) >>> resp = chain . documents_begin_transaction ( comment = ' Using parameters ' ) >>> print ( resp )