STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fingerprint.py
Go to the documentation of this file.
1
"""The design's identity: a hash of its validated contents, the same wherever it is taken."""
2
3
from
__future__
import
annotations
4
5
import
hashlib
6
import
json
7
from
typing
import
Any
8
9
10
def
config_fingerprint
(config: Any) -> str:
11
raw = json.dumps(config.model_dump(mode=
"json"
), sort_keys=
True
, default=str).encode(
"utf-8"
)
12
return
hashlib.sha256(raw).hexdigest()
engine.layerx.fingerprint.config_fingerprint
str config_fingerprint(Any config)
Definition
fingerprint.py:10
EngineDesign
engine
layerx
fingerprint.py
Generated by
1.15.0