29 lines
513 B
Python
29 lines
513 B
Python
import json
|
|
|
|
# def parse_individual_heartbeat(heartbeat):
|
|
# processed_heartbeat = {
|
|
# "id": heartbeat.get("id", ""),
|
|
# "branch": heartbeat.get("branch", null),
|
|
# }
|
|
|
|
|
|
f = open("heartbeats.json")
|
|
data = json.load(f)
|
|
|
|
days = data["days"]
|
|
first_day = days[0]["heartbeats"]
|
|
sample_heartbeat = days[0]["heartbeats"][0]
|
|
formatted = json.dumps(sample_heartbeat, indent=4)
|
|
|
|
test_batch = first_day[:10]
|
|
dead_letter = []
|
|
print(len(test_batch))
|
|
|
|
|
|
# for hb in first_day:
|
|
|
|
|
|
print(formatted)
|
|
|
|
|
|
f.close()
|