Python client library used in SKALE network components.
- Python 3.11+ support
- Compatibility with
web3.pyv7
pip install skale.py- Ledger Wallet (works with Ledger Nano S and other models)
- RPC Wallet (works with SKALE Transactions Manager)
- SGX Wallet (works with SKALE SGX Wallet)
- Web3 Wallet (works with
web3.pyproviders and private keys in memory)
With Web3Wallet (private key in memory):
from skale import SkaleManager
from skale.wallets import Web3Wallet
from skale.utils.web3_utils import init_web3
web3 = init_web3(ENDPOINT)
wallet = Web3Wallet(private_key, web3)
skale = Skale(ENDPOINT, ABI_FILEPATH, wallet)With external transactions manager:
from skale import SkaleManager
from skale.wallets import RPCWallet
web3 = init_web3(ENDPOINT)
wallet = RPCWallet(TM_URL)
skale = Skale(ENDPOINT, ABI_FILEPATH, wallet)Interactions with SKALE contracts
active_nodes = skale.nodes.get_active_node_ips()
schains = skale.schains.get_schains_for_owner('0x...')Due to the web3.py v5 limitations you have to create separate instances of the skale.py for the each thread.
Take a look on the tests/multithreading_test.py for the reference.
nano .git/hooks/pre-commituv run ruff check skale/
uv run mypy skale/uv sync --all-extrasTo export environment variables for running tests locally, run:
. ./scripts/export_env.shbash build_and_publish.sh major/minor/patch export $(cat .env | xargs) && bash build_and_publish.sh major/minor/patchThe version scheme for this repo is {major}.{minor}.{patch}
For more details see: https://semver.org/
All contributions are made under the GNU Affero General Public License v3. See LICENSE.