Skip to main content

Garf implementation for Google Ads API

Project description

garf for Google Ads API

PyPI Downloads PyPI

garf-google-ads simplifies fetching data from Google Ads API using SQL-like queries.

Prerequisites

Installation

pip install garf-google-ads

Usage

Run as a library

import garf_google_ads
from garf_io import writer

# Fetch report
query = """
  SELECT
    campaign.id AD campaign_id,
    campaign.name AS campaign
  FROM campaign
  WHERE
    campaign.status = ENABLED
"""
fetched_report = (
  garf_google_ads.GoogleAdsApiReportFetcher()
  .fetch(query, query=query)
)

# Write report to console
console_writer = writer.create_writer('console')
console_writer.write(fetched_report, 'output')

Run via CLI

Install garf-executors package to run queries via CLI (pip install garf-executors).

garf <PATH_TO_QUERIES> --source google-ads \
  --output <OUTPUT_TYPE> \
  --source.<SOURCE_PARAMETER=VALUE>

where:

  • <PATH_TO_QUERIES> - local or remove files containing queries
  • <OUTPUT_TYPE> - output supported by garf-io library.
  • <SOURCE_PARAMETER=VALUE - key-value pairs to refine fetching, check available source parameters.

Available source parameters

name values comments
account Google Ads Account to get data from
path_to_config Path to google-ads.yaml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

garf_google_ads-0.0.2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

garf_google_ads-0.0.2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file garf_google_ads-0.0.2.tar.gz.

File metadata

  • Download URL: garf_google_ads-0.0.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for garf_google_ads-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7529307f18e6be2e759282fffd42b6b28d01cc1fe08d1dcc81d66e29064aa113
MD5 3a2745edcb0ca4a757036c915932392f
BLAKE2b-256 b2c7f9ab6092fd320bca60bc11cedebba419248d10e6fe1bb44438fffbd8b8ee

See more details on using hashes here.

File details

Details for the file garf_google_ads-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: garf_google_ads-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for garf_google_ads-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee196f24bd6beff3f6ff197f5029fd8db808306785c4f8b8497f45c643f90b0d
MD5 e89e01623b0386307c9cead0a06097a9
BLAKE2b-256 4badcefa2ea4e48904039285d4ea78fd686f1c737abe50d77c5c16c72dd91ba8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page