MCPcopy
hub / github.com/vinta/awesome-python / save_cache

Function save_cache

website/fetch_github_stars.py:39–45  ·  view source on GitHub ↗

Write the star cache to disk, creating data/ dir if needed.

(cache: dict)

Source from the content-addressed store, hash-verified

37
38
39def save_cache(cache: dict) -> None:
40 """Write the star cache to disk, creating data/ dir if needed."""
41 DATA_DIR.mkdir(parents=True, exist_ok=True)
42 CACHE_FILE.write_text(
43 json.dumps(cache, indent=2, ensure_ascii=False) + "\n",
44 encoding="utf-8",
45 )
46
47
48def build_graphql_query(repos: Sequence[str]) -> str:

Callers 2

mainFunction · 0.85

Calls

no outgoing calls