Skip to content

Instantly share code, notes, and snippets.

@BURG3R5
Last active June 6, 2022 12:44
Show Gist options
  • Save BURG3R5/b12e41b6339e195acdcaa389051d6be5 to your computer and use it in GitHub Desktop.
Save BURG3R5/b12e41b6339e195acdcaa389051d6be5 to your computer and use it in GitHub Desktop.
# IN: file_path
events: list[dict[str, Any]] = []
if path.exists(file_path):
with open(file_path, encoding="utf-8") as file:
events: list[dict[str, Any]] = json.load(file)["messages"]
# OUT: events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment