Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

skale.py

PyPI version GitHub Workflow Status codecov Libraries.io dependency status for GitHub repo Discord

Python client library used in SKALE network components.

  • Python 3.11+ support
  • Compatibility with web3.py v7

Installation

pip install skale.py

Usage

Supported wallets

  • 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.py providers and private keys in memory)

Library initialization

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.active_node_ips()
schains = skale.schains.schains_for_owner('0x...')

Working in multiple threads

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.

Development

Add pre-commit hook:
nano .git/hooks/pre-commit
uv run ruff check skale/
uv run mypy skale/
Install local version
uv sync --all-extras
Export environment variables

To export environment variables for running tests locally, run:

. ./scripts/export_env.sh

Build and publish library

bash build_and_publish.sh major/minor/patch

If you're using .env file

 export $(cat .env | xargs) && bash build_and_publish.sh major/minor/patch

Versioning

The version scheme for this repo is {major}.{minor}.{patch} For more details see: https://semver.org/

License

GitHub

All contributions are made under the GNU Affero General Public License v3. See LICENSE.

Metadata

Release files for skale.py 8.0.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skale.py 8.0.dev1
File Size Uploaded Provenance Actions
skale_py-8.0.dev1.tar.gz 164.4 kB Without provenance Details for skale_py-8.0.dev1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for skale.py 8.0.dev1
File Interpreter ABI Platform Actions
skale_py-8.0.dev1-py3-none-any.whl Python 3 none any Details for skale_py-8.0.dev1-py3-none-any.whl

Total release size: 350.7 kB

Release files / skale_py-8.0.dev1.tar.gz

Download URL skale_py-8.0.dev1.tar.gz
Size 164.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1b317ab6c04d9e54585055861b8dfd54f5a4f399331e6290ed8232496a7e4f1d
BLAKE2b-256 checksum
How to use checksums
ca4339a6b2cbd3f8cb3c1cddb3b940a8640f271062bc96fd8a5a370811759f84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / skale_py-8.0.dev1-py3-none-any.whl

Download URL skale_py-8.0.dev1-py3-none-any.whl
Size 186.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ba1b657d47459c592261da7b88e30481d0049dc2e73940b64ea5114e948720a
BLAKE2b-256 checksum
How to use checksums
5beeeeb16cc2bfbb8c512a80fd3bf03a0996d30b1b67fa65a28ba81e8d40b0ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for skale.py 8.0.dev1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page