Repack — Global Metadata Dat
class GlobalMetadata: """ A singleton-style metadata store with validation, versioning, and export to JSON. """ _instance = None _metadata = {} def __new__(cls): if cls._instance is None: cls._instance = super().__new__(cls) cls._instance._metadata = { "system": "version": "1.0.0", "environment": "production" , "project": {}, "user": {} } return cls._instance
def set(self, category, key, value, validate=None): if category not in self._metadata: self._metadata[category] = {} if validate and not validate(value): raise ValueError(f"Invalid value for key: value") self._metadata[category][key] = value global metadata dat
def get(self, category, key, default=None): return self._metadata.get(category, {}).get(key, default) It holds the version, artist, and the state
It sounds like you’re asking for a piece related to — likely in the context of TouchDesigner (where .dat is a text or table DAT operator) or a broader data management / pipeline concept. It holds the version
No pixel moves, no chop transforms the space, without first checking the metadata’s face. It holds the version, artist, and the state – a quiet ghost that orchestrates the great. Let me know which direction matches your intent, and I can expand it into a full module or documentation.