garf for Campaign Manager 360 API
garf-campaign-manager simplifies fetching data from Campaign Manager 360 API using SQL-like queries.
Prerequisites
- Campaign Manager 360 API enabled.
- Credentials configured.
Installation
pip install garf-campaign-manager
Usage
Run as a library
from garf.community.google.campaign_manager import CampaignManager360ApiReportFetcher
from garf.io import writer
# Fetch report
query = """
SELECT
dimensions.advertiser AS advertiser,
advertiserId AS advertiser_id,
metric.clicks AS clicks
FROM standard
WHERE
dateRange IN (2025-01-01, 2025-12-31)
"""
fetched_report = CampaignManager360ApiReportFetcher(profile_id=<PROFILE_ID>).fetch(query, title='sample_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 campaign-manager \
--output <OUTPUT_TYPE> \
--source.<SOURCE_PARAMETER=VALUE>
where:
<PATH_TO_QUERIES>- local or remove files containing queriesoutput- output supported bygarf-iolibrary.<SOURCE_PARAMETER=VALUE- key-value pairs to refine fetching, check available source parameters.
Available source parameters
| name | values | comments |
|---|---|---|
profile_id |
Id of CM360 profile | |
credentials_file |
File with Oauth or service account credentials | You can expose credentials_file as GARF_CAMPAIGN_MANAGER_360_CREDENTIALS_FILE ENV variable |
auth_mode |
Type of authentication: oauth or service_account |
oauth is the default mode |
Metadata
Release files for garf-campaign-manager 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| garf_campaign_manager-0.0.2.tar.gz | 8.6 kB | Without provenance | Details for garf_campaign_manager-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| garf_campaign_manager-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for garf_campaign_manager-0.0.2-py3-none-any.whl |
Total release size: 19.5 kB
Release files / garf_campaign_manager-0.0.2.tar.gz
| Download URL | garf_campaign_manager-0.0.2.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f43dc829bbc4b99c7566db8a9a196229b6b2a11532f04c0da50757be7f921f8
|
|
BLAKE2b-256 checksum How to use checksums |
e2fa0e2c8d2db0de2fbacc0dbdf44db104102a6af0008531aeb2aec88ebf73e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.4
|
Release files / garf_campaign_manager-0.0.2-py3-none-any.whl
| Download URL | garf_campaign_manager-0.0.2-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
433e005109fabe9dc692ab8d1040156377330369b46882abecd28d6806812cf1
|
|
BLAKE2b-256 checksum How to use checksums |
8b484faa9c04be2556d50bfafdcf25f8a7cf07d83415f2188a3de815bd4c34b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.4
|
Security for garf-campaign-manager 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.