adloop 0.4.1__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {adloop-0.4.1 → adloop-0.4.2}/PKG-INFO +1 -1
  2. {adloop-0.4.1 → adloop-0.4.2}/pyproject.toml +1 -1
  3. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/__init__.py +6 -2
  4. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/cli.py +33 -30
  5. {adloop-0.4.1 → adloop-0.4.2}/README.md +0 -0
  6. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/__main__.py +0 -0
  7. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ads/__init__.py +0 -0
  8. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ads/client.py +0 -0
  9. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ads/currency.py +0 -0
  10. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ads/forecast.py +0 -0
  11. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ads/gaql.py +0 -0
  12. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ads/pmax.py +0 -0
  13. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ads/read.py +0 -0
  14. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ads/write.py +0 -0
  15. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/auth.py +0 -0
  16. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/bundled_credentials.json +0 -0
  17. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/config.py +0 -0
  18. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/crossref.py +0 -0
  19. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ga4/__init__.py +0 -0
  20. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ga4/client.py +0 -0
  21. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ga4/reports.py +0 -0
  22. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/ga4/tracking.py +0 -0
  23. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/safety/__init__.py +0 -0
  24. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/safety/audit.py +0 -0
  25. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/safety/guards.py +0 -0
  26. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/safety/preview.py +0 -0
  27. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/server.py +0 -0
  28. {adloop-0.4.1 → adloop-0.4.2}/src/adloop/tracking.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: adloop
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Stop switching between Google Ads, GA4, and your code editor to figure out why conversions dropped.
5
5
  Keywords: mcp,google-ads,google-analytics,ga4,cursor,marketing
6
6
  Author: Daniel Klose
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "adloop"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  description = "Stop switching between Google Ads, GA4, and your code editor to figure out why conversions dropped."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -2,7 +2,7 @@
2
2
 
3
3
  import sys
4
4
 
5
- __version__ = "0.4.1"
5
+ __version__ = "0.4.2"
6
6
 
7
7
 
8
8
  def main() -> None:
@@ -14,7 +14,11 @@ def main() -> None:
14
14
  if len(sys.argv) > 1 and sys.argv[1] == "init":
15
15
  from adloop.cli import run_init_wizard
16
16
 
17
- run_init_wizard()
17
+ try:
18
+ run_init_wizard()
19
+ except KeyboardInterrupt:
20
+ print("\n\n Setup cancelled.\n")
21
+ sys.exit(130)
18
22
  else:
19
23
  from adloop.server import mcp
20
24
 
@@ -150,39 +150,42 @@ def _generate_config_yaml(
150
150
  ) -> str:
151
151
  dry_run_str = "true" if require_dry_run else "false"
152
152
 
153
- google_section = "google:\n"
153
+ lines = [
154
+ "# AdLoop configuration",
155
+ "# Generated by: adloop init",
156
+ "# Docs: https://github.com/kLOsk/adloop",
157
+ "",
158
+ "google:",
159
+ ]
154
160
  if project_id:
155
- google_section += f' project_id: "{project_id}"\n'
161
+ lines.append(f' project_id: "{project_id}"')
156
162
  if credentials_path:
157
- google_section += f' credentials_path: "{credentials_path}"\n'
163
+ lines.append(f' credentials_path: "{credentials_path}"')
158
164
  else:
159
- google_section += " # Using built-in credentials (no credentials_path needed)\n"
160
- google_section += ' token_path: "~/.adloop/token.json"\n'
161
-
162
- return textwrap.dedent(f"""\
163
- # AdLoop configuration
164
- # Generated by: adloop init
165
- # Docs: https://github.com/kLOsk/adloop
166
-
167
- {google_section}
168
- ga4:
169
- property_id: "{property_id}"
170
-
171
- ads:
172
- developer_token: "{developer_token}"
173
- customer_id: "{customer_id}"
174
- # MCC / Manager Account ID (required if using a manager account)
175
- login_customer_id: "{login_customer_id}"
176
-
177
- safety:
178
- # Maximum daily budget AdLoop can set (safety cap)
179
- max_daily_budget: {max_daily_budget}
180
- max_bid_increase_pct: 100
181
- # When true, confirm_and_apply always runs as dry_run regardless of the parameter
182
- require_dry_run: {dry_run_str}
183
- log_file: "~/.adloop/audit.log"
184
- blocked_operations: []
185
- """)
165
+ lines.append(" # Using built-in credentials (no credentials_path needed)")
166
+ lines.append(' token_path: "~/.adloop/token.json"')
167
+ lines += [
168
+ "",
169
+ "ga4:",
170
+ f' property_id: "{property_id}"',
171
+ "",
172
+ "ads:",
173
+ f' developer_token: "{developer_token}"',
174
+ f' customer_id: "{customer_id}"',
175
+ " # MCC / Manager Account ID (required if using a manager account)",
176
+ f' login_customer_id: "{login_customer_id}"',
177
+ "",
178
+ "safety:",
179
+ " # Maximum daily budget AdLoop can set (safety cap)",
180
+ f" max_daily_budget: {max_daily_budget}",
181
+ " max_bid_increase_pct: 100",
182
+ " # When true, confirm_and_apply always runs as dry_run regardless of the parameter",
183
+ f" require_dry_run: {dry_run_str}",
184
+ ' log_file: "~/.adloop/audit.log"',
185
+ " blocked_operations: []",
186
+ "",
187
+ ]
188
+ return "\n".join(lines)
186
189
 
187
190
 
188
191
  def _generate_cursor_snippet() -> str:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes