misp-galaxy/tools/tidal-api/models/galaxy.py
2024-02-23 11:14:00 +01:00

15 lines
No EOL
317 B
Python

import json
from dataclasses import dataclass, asdict
@dataclass
class Galaxy():
description: str
name: str
namespace: str
type: str
uuid: str
version: str
def save_to_file(self, path: str):
with open(path, "w") as file:
file.write(json.dumps(asdict(self), indent=4))