Skip to content

Commit

Permalink
Create generate_reports.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Nov 26, 2024
1 parent cff9f12 commit 64c7fb4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions QuantumNexusProtocol/scripts/generate_reports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import json
import requests

def generate_report():
response = requests.get("http://localhost:8545/report")
if response.status_code == 200:
report_data = response .json()
with open('network_report.json', 'w') as f:
json.dump(report_data, f, indent=4)
print("Report generated successfully: network_report.json")
else:
print("Error generating report:", response.status_code)

if __name__ == "__main__":
generate_report()

0 comments on commit 64c7fb4

Please sign in to comment.