Mind Lake SDK
  • Overview
  • Get started
    • Tutorial step-by-step
    • TypeScript Quick-Start
    • Python Quick-Start
  • Use Cases
    • 1-Single User with Structured Data
    • 2-Single User with UnStructured Data
    • 3-Multi Users with Permission Sharing
  • Glossary
  • TYPESCRIPT API REFERENCE
    • MindLake
    • MindLake.DataLake
    • MindLake.Cryptor
    • MindLake.Permission
    • Return Code
  • PYTHON API REFERENCE
    • MindLake
    • MindLake.DataLake
    • MindLake.Cryptor
    • MindLake.Permission
    • Return Code
Powered by GitBook
On this page
  • 1. connect() Method
  • Parameters
  • Returns
  • Example
  • 2. MindLake.ResultType
  • 3. MindLake.DataType
  1. PYTHON API REFERENCE

MindLake

PreviousPYTHON API REFERENCENextMindLake.DataLake

Last updated 1 year ago

1. connect() Method

Connect to Mind Lake while ensuring that all encryption keys are prepared and available. Prior to making any function calls within the SDK, execute this function as it serves as the entry point.

mindlakesdk.connect(walletPrivateKey: str, appKey: str, chainID: str, gateWay: str = None) -> MindLake
MindLake(walletPrivateKey: str, appKey: str, chainID: str, gateWay: str = None) -> MindLake

Parameters

  1. walletPrivateKey - str: the private key of your wallet

  2. chainID - str: the ID of the supported chain.

  3. appKey - str: used for authorization, allowing users of your application to gain access to Mind Lake. As a developer, you can apply for APP Keys from Mind Scan.

Returns

An object of . .

Example

# '5' is example of Goerli Testnet chainID
chainID = '5'
mind = mindlakesdk.connect("YOUR_OWN_WALLET_PRIVATEKEY", "YOUR_OWN_APP_KEY", chainID)
assert mind, mind.message

2. MindLake.ResultType

Every method call in the Mind Lake SDK returns an object of ResultType.

class ResultType:
    def __init__(self, code: int, message: str = None, data = None):
        self.code = code
        self.message = message
        self.data = data

    def __bool__(self):
        return self.code == 0
  • code - int: The return code of the method call. A return value of 0 indicates success, while non-zero values represent a specific error code.

  • message - str: If the return code is non-zero, an error message will be provided to describe the specific error encountered during the method call.

  • data - any: If a method call returns a result, it will be stored in the data field.

3. MindLake.DataType

The DataType enum defines a comprehensive range of supported data types. This enum can be used in conjunction with the MindLake.DataLake.Column class, which represents a single column in a table, to specify the data type of the column. By utilizing the DataType enum, you can ensure that your data is stored in the appropriate format and can be processed correctly by the system.

Members

  1. int4

  2. int8

  3. float4

  4. float8

  5. decimal

  6. text

  7. timestamp

For more information