Deploying with Swan SDK
Last updated
Last updated
The Swan SDK is a toolkit designed to simplify interactions with the Swan Chain Network Resource. It provides a streamlined interface for creating and managing computational tasks, retrieving hardware information, processing payments, and monitoring task statuses.
To use swan-sdk
, a Swan API key is required. Steps to get an API Key:
Go to , switch network to .
Login with your wallet.
Click API Keys
-> Generate API Key
Installation
To use Python 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.20.3).
Install the latest Swan SDK release via pip:
Or install via GitHub:
Using Python Swan SDK
To use Python 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.
More resources about swan SDK can be found here:
go-swan-sdk
requires version or above.
With , go [build|run|test]
automatically fetches the necessary dependencies when you add import
in your project: