{"id":51161565,"url":"https://github.com/doitintl/insights-by-ava","last_synced_at":"2026-06-26T14:01:43.319Z","repository":{"id":350871299,"uuid":"1203843052","full_name":"doitintl/insights-by-ava","owner":"doitintl","description":"Ava generates Finops Insights based on cost data","archived":false,"fork":false,"pushed_at":"2026-04-12T13:57:34.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-10T15:41:48.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doitintl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-07T12:43:02.000Z","updated_at":"2026-04-12T13:57:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/doitintl/insights-by-ava","commit_stats":null,"previous_names":["doitintl/insights-by-ava"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/doitintl/insights-by-ava","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Finsights-by-ava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Finsights-by-ava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Finsights-by-ava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Finsights-by-ava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doitintl","download_url":"https://codeload.github.com/doitintl/insights-by-ava/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Finsights-by-ava/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34819597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-26T14:01:42.565Z","updated_at":"2026-06-26T14:01:43.315Z","avatar_url":"https://github.com/doitintl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DoiT Reports and Insights Pipeline\n\nSmall Python pipeline to:\n- query recent cloud costs from DoiT Reports API,\n- generate optimization recommendations with Ava,\n- filter near-duplicates against existing FinOps insights,\n- create custom insights via Insights API.\n\n## Requirements\n\n- Python 3.10+\n- Dependencies from `requirements.txt`:\n  - `requests`\n  - `python-dotenv`\n\nInstall:\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n## Configuration\n\nCreate `.env` with:\n\n```bash\nDOIT_API_KEY=...\nCUSTOMER_CONTEXT=...                 # read/query context\nDOIT_API_KEY_WRITES=...              # write key used for insight creation\nCUSTOMER_CONTEXT_WRITES=...          # write context used for insight creation\n# Optional:\n# MAX_INSIGHTS_WRITE=1\n```\n\nNotes:\n- `DOIT_API_KEY_WRITES` is required for the insight-creation phase.\n- `CUSTOMER_CONTEXT_WRITES` is required for the insight-creation phase.\n- Account/identity used for writes needs **Insights Manager** permission.\n\n## Run\n\nNormal run (uses cached files when present):\n\n```bash\npython3 report.py\n```\n\nForce full refresh:\n\n```bash\npython3 report.py --force\n```\n\nLimit number of insight writes (default: `1`, or `MAX_INSIGHTS_WRITE` if set):\n\n```bash\npython3 report.py --max-insights-write 3\n```\n\n## Pipeline phases\n\n`report.py` runs these phases:\n1. **Query phase**: fetches last-month costs from Reports API.\n2. **Ava phase**: generates optimization recommendations from cost data.\n3. **Insights read phase**: fetches existing FinOps insights.\n4. **Compare/filter phase**: removes recommendations similar to existing insights.\n5. **Insights write phase**: creates custom insights from filtered recommendations.\n\n## Output files\n\n- `cost_report_data.json`\n- `ava_generated_with_significant_value.json`\n- `existing_insights.json`\n- `ava_recommendations_filtered.json`\n- `insights_created_results.json`\n\n`insights_created_results.json` includes:\n- `created` count,\n- `errors` with response details on failures,\n- `created_insights` when at least one insight is successfully created.\n\n## APIs used\n\n- Reports query endpoint on `https://api.doit.com/analytics/v1/reports/query`\n- Ava endpoint on `https://api.doit.com/ava/v1/askSync`\n- Insights endpoint on `https://api.doit.com/insights/v1/results`\n\nDocs:\n- [DoiT Insights API](https://developer.doit.com/docs/insights-api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2Finsights-by-ava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoitintl%2Finsights-by-ava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2Finsights-by-ava/lists"}