- 📔 Table of Contents
- 🌟 0. Other Programming Languages
- 🌟 1. Install Or Upgrade Python If Needed
- 🌟 2. Install MindLakeSDK
- 🌟 3. Get Examples
- 🌟 4. Prepare env.py If Needed
- 🌟 5. Execute the examples
- Click to view step-by-step to configure Python if Python is not installed or upgraded
- Open Terminal and Enter the install command:
pip install mindlakesdkThe required package will be automatically installed as a dependency, and get the following output in the end:
Installing collected packages: mindlakesdk
Successfully installed mindlakesdk-1.0.1
- Validate the installation in Terminal
$ pip show mindlakesdk
Name: mindlakesdk
Version: 1.0.1
Summary: A Python SDK to connect to Mind Lake
Home-page:
Author:
Author-email: Mind Labs <biz@mindnetwork.xyz>
License:
Location: /Users/xxx/.pyenv/versions/3.10.11/lib/python3.10/site-packages
Requires: eth-account, pynacl, web3
Required-by:- You can also validate in IDLE
$ python3
Python 3.10.11 (main, May 1 2023, 01:38:51) [Clang 16.0.2 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mindlakesdk
>>>- Enter the following command in the terminal window to fetch the example code from github:
git clone https://github.com/mind-network/mind-lake-sdk-python.git- Enter the path of example code:
cd mind-lake-sdk-python/examplesenv.pycontains the settings of parameters used in examples and use cases, you can copyenv_template.pyto the nameenv.pyand modify it as per your requirement.
env.pywill needwalletAddress,walletPrivateKeyandappKey.
-
2.1. Click 🎨 4.1. Prepare Wallet if test wallets (by MetaMask) are not created and
walletAddressis not set inenv.py. -
2.2. Click 🎯 4.1.4 Export private key from MetaMask to env.py if
walletPrivateKeyis not set inenv.py -
2.3 Click 🎨 4.2. Prepare appKey if
appKeyis not set.
- If you want to run the examples of QuickStart, Use Case 1 and Use Case 2, you only need to fill out
walletAddressAlice,walletPrivateKeyAliceandappKey. - If you want to run Use Case 3, you need to fill out the walltes info for all of
Alice,BobandCharlie.
You can execute the following commands to run the quickstart and use cases.
python quickstart.pypython use_case_1.pypython use_case_2.pyYou can also check the result by opening these two picture files.

python use_case_3.py



