Skip to main content

SKALE core settings and types

Project description

skale.py-core

Core settings and types for SKALE node. Lightweight — no web3 or sgx dependencies.

Installation

pip install skale.py-core

Usage

Types

from skale_core.types import EnvType, NodeType, NodeMode, SchainName

node_type: NodeType = 'skale'
node_mode: NodeMode = 'active'
env: EnvType = 'mainnet'
name: SchainName = SchainName('my-chain')

Writing settings files

from pathlib import Path
from skale_core.settings import write_internal_settings_file, write_node_settings_file, SkaleSettings

write_internal_settings_file(
    path=Path('/etc/skale/node.toml'),
    data={'node_type': 'skale', 'node_mode': 'active', 'skale_dir_host': '/etc/skale'},
)

write_node_settings_file(
    path=Path('/etc/skale/settings.toml'),
    settings_type=SkaleSettings,
    data={
        'env_type': 'mainnet',
        'endpoint': 'http://localhost:8545',
        'node_version': '1.0.0',
        'block_device': '/dev/sda',
        'manager_contracts': '0x1',
        'ima_contracts': '0x2',
        'sgx_url': 'https://sgx.example.com',
        'docker_lvmpy_version': '1.0.0',
    },
)

Reading settings at runtime

from skale_core.settings import get_settings, SkaleSettings

settings = get_settings(SkaleSettings)
print(settings.endpoint, settings.env_type)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skale_py_core-7.14.dev0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skale_py_core-7.14.dev0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file skale_py_core-7.14.dev0.tar.gz.

File metadata

  • Download URL: skale_py_core-7.14.dev0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skale_py_core-7.14.dev0.tar.gz
Algorithm Hash digest
SHA256 654903a9df33d2d0ec9e36c88a0f184253e9ee425ab12f8bb31fd78db7a86523
MD5 116ba6b16a9b1610393196d6b3de8e48
BLAKE2b-256 cdd4025f5a2c9704818c5f03625d97616c02a457d575f2e021623c07752fdb65

See more details on using hashes here.

File details

Details for the file skale_py_core-7.14.dev0-py3-none-any.whl.

File metadata

  • Download URL: skale_py_core-7.14.dev0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skale_py_core-7.14.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 b54104f3058acf3477a1c9975eda7a8878a99ff3acf66ef563992c7693db8ae8
MD5 e37d9eda009a83f8d0fbb7cb50fa84cc
BLAKE2b-256 cdb3254838a6d73225bebc4cd0d9d9d26a5bf78007037e2dc7c697ef705b1af3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page