Python Swan SDK
This guide details the steps needed to install or update the SWAN SDK for Python. The SDK is a comprehensive toolkit designed to facilitate seamless interactions with the SwanChain API.
Installation
To use Swan SDK, you first need to install it and its dependencies. Before installing Swan SDK, install Python 3.8 or later and web3.py(==6.15.1).
Install the latest Swan SDK release via pip:
Or install via GitHub:
Get Orchestrator API Key
To use swan-sdk
, an Orchestrator API key is required.
Steps to get an API Key:
Go to Orchestrator Dashboard, switch network to Mainnet.
Login through MetaMask.
Click the user icon on the top right.
Click 'Show API-Key' -> 'New API Key'
Store your API Key safely, do not share with others.
Using Swan
To use Swan SDK, you must first import it and indicate which service you're going to use:
Now that you have an Orchestrator
service, you can create and deploy instance applications as an Orchestrator task with the service.
Then you can follow up task deployment information and the URL for running applications.
Last updated