Soroban has a Python Software Development Kit (SDK) that allows developers to interact with the Soroban Network using the Python programming language. In this post, we will go over the steps to install Soroban Python SDK on Windows.
1. Install Python
Before we can install the Soroban Python SDK, we need to have Python installed on our Windows computer. In this post, we will install Python via Microsoft Store, since it's easy and simple. Here's how:
1.Open the Microsoft Store on your computer.
2.Search for "Python" in the search bar.
3.Click on the "Python 3.x" option that appears in the search results. (Note: I'm using Python 3.7)
4.Click the "Get" button to download and install Python on your computer.
5.To verify that Python has been installed correctly, open the command prompt and enter the following command:
If Python has been installed correctly, you should see the version number, just like in the image above.
2. Install Soroban Python SDK (Stellar Python SDK with Soroban Support)
The Soroban Python SDK that we're going to use is basically the Stellar Python SDK with Soroban support. To install the SDK, we will use the source code from the Stellar Python SDK GitHub but use its Soroban branch. To install, use the following command in the command prompt:
pip install git+https://github.com/StellarCN/py-stellar-base.git@soroban
This will install the Soroban Python SDK and all its dependencies.
3. Verify the installation
To verify that the Soroban Python SDK has been installed correctly, we can write a simple Python script that imports the SDK and prints its version. Open your text editor and create a new file called test.py. Add the following code to the file:
import stellar_sdk print(stellar_sdk.__version__)
Save the file and run it using the following command in your terminal or command prompt:
If the SDK has been installed correctly, you should see the version number printed to the console.
In this blog post, we have gone over the steps to install the Soroban Python SDK. With the SDK installed, you can start building applications that interact with the Stellar Futurenet (Soroban) network using the Python programming language.
Top comments (0)