Skip to main content

Garf implementation for Google Bid Manager API

Project description

garf for Bid Manager API

PyPI Downloads PyPI

garf-bid-manager simplifies fetching data from Bid Manager API using SQL-like queries.

Prerequisites

Installation

pip install garf-bid-manager

Usage

Run as a library

import garf_bid_manager
from garf_io import writer

# Fetch report
query = """
  SELECT
    advertiser_name,
    metric_clicks AS clicks
  FROM standard
  WHERE advertiser = 1
    AND dataRange = LAST_7_DAYS
"""
fetched_report = (
  garf_bid_manager.BidManagerApiReportFetcher()
  .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 bid-manager \
  --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
credentials_file File with Oauth or service account credentials You can expose credentials_file as GARF_BID_MANAGER_CREDENTIALS_FILE ENV variable

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_bid_manager-0.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

garf_bid_manager-0.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: garf_bid_manager-0.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.24

File hashes

Hashes for garf_bid_manager-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fa9613e17d2388885ee974309e3f0c7b827b3612316c424dc910d63e2bdd272b
MD5 6fee324b991f4037a12b845f9d04d1b2
BLAKE2b-256 902ab4a73300f67854b8bf2daa4051bca54b77256cbd466f1e6e9c7ab0b97ab5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for garf_bid_manager-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0bdab37fff3192627788cb5182bafc4eb919d95a498f765377cbfae9ea6378cb
MD5 13f0dda557c3c8418d4b159db532a314
BLAKE2b-256 a52d4e84ea8655e5128181eda4d673e0df6c6aa5751c97809c2854355b1230cb

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