Garf implementation for Google Ads API
Project description
garf for Google Ads API
garf-google-ads simplifies fetching data from Google Ads API using SQL-like queries.
Prerequisites
- Google Ads API enabled.
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-executorspackage 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 bygarf-iolibrary.<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
Release history Release notifications | RSS feed
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.1.tar.gz
(9.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file garf_google_ads-0.0.1.tar.gz.
File metadata
- Download URL: garf_google_ads-0.0.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c77e188f9eb9ebcd8490e46e9320db697922ea064d6c9eba7c9cabc966b1eead
|
|
| MD5 |
264d2a3d36b7f3d9ff062729cfc054b3
|
|
| BLAKE2b-256 |
a6dc551ebd5a094afa4e22a049d0ccb0c15f7a430e5bcfbbf630ba2c6f735de9
|
File details
Details for the file garf_google_ads-0.0.1-py3-none-any.whl.
File metadata
- Download URL: garf_google_ads-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
967117d36c0cfe140ea385fb8d0476dc5ced3e1f78564f1badec10c824f2904b
|
|
| MD5 |
f5113e25a745d437bd1ee15449a96fe9
|
|
| BLAKE2b-256 |
751e9866a84bf4c003b8f502bc7306d15317fa37ef62e9abfb9484361706d4fe
|