MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / write_data

Function write_data

docs/website/scripts/generate_cn1libs.py:181–191  ·  view source on GitHub ↗
(libs: List[Dict[str, str]], status: str, error: str = "")

Source from the content-addressed store, hash-verified

179
180
181def write_data(libs: List[Dict[str, str]], status: str, error: str = "") -> None:
182 payload = {
183 "source_url": SOURCE_URL,
184 "generated_at_utc": datetime.now(timezone.utc).isoformat(),
185 "status": status,
186 "error": error,
187 "count": len(libs),
188 "libs": libs,
189 }
190 OUT_PATH.parent.mkdir(parents=True, exist_ok=True)
191 OUT_PATH.write_text(json.dumps(payload, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
192
193
194def main() -> int:

Callers 1

mainFunction · 0.85

Calls 2

nowMethod · 0.45
mkdirMethod · 0.45

Tested by

no test coverage detected