For the complete documentation index, see llms.txt. This page is also available as Markdown.

Export To CSV

Export growthepie data to CSV for spreadsheet or notebook workflows.

This recipe downloads one metric export and writes it to CSV. Use this recipe when you want a local file for spreadsheet workflows, versioned data snapshots, or notebook inputs.

Example

import csv
import requests

url = "https://api.growthepie.com/v1/export/txcount.json"
rows = requests.get(url, timeout=30).json()

with open("txcount.csv", "w", newline="", encoding="utf-8") as f:
    writer = csv.DictWriter(f, fieldnames=["metric_key", "origin_key", "date", "value"])
    writer.writeheader()
    writer.writerows(rows)

print("Wrote txcount.csv")

Last updated