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
Release history Release notifications | RSS feed
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-0.1.0.tar.gz
(4.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skale_py_core-0.1.0.tar.gz.
File metadata
- Download URL: skale_py_core-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
982e3b9a72b114e9feba8474a3ce49629f4e6f86fee073e066322a67c1937eeb
|
|
| MD5 |
47497c555a113107668d67b0ce253f8f
|
|
| BLAKE2b-256 |
3b0facae539b3236ff44c1b5ae429f48f03d5fb06ba07ccb209974975c99acaa
|
File details
Details for the file skale_py_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: skale_py_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba7021840a0cea76497e40918fd537827a9e65a97c3399435ef213b1b8258309
|
|
| MD5 |
252db52cc823f5fa3cd27e0147f770f2
|
|
| BLAKE2b-256 |
7fadda475bf5216f76b25f63ff602ea3a1cfb8061d50df45d392d762c3a0328a
|