Garf implementation for Google Analytics API
Project description
garf for Google Analytics API
garf-google-analytics simplifies fetching data from Google Analytics API using SQL-like queries.
Prerequisites
- Google Analytics API enabled.
Installation
pip install garf-google-analytics
Usage
Run as a library
from garf.community.google.analytics import GoogleAnalyticsApiReportFetcher
from garf.io import writer
# Fetch report
fetched_report = (
GoogleAnalyticsApiReportFetcher()
.fetch(query, query="<YOUR_QUERY_HERE">, property_id=PROPERTY_ID)
)
# 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-analytics \
--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 |
|---|---|---|
property_id |
Property to get data to | Multiple properties are supported, should be comma-separated |
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
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_analytics-1.0.0.tar.gz.
File metadata
- Download URL: garf_google_analytics-1.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b56cf93885df2b44ecf379f344a8682b1330309e335d9561a94377aeb22fd42
|
|
| MD5 |
385685baf8150e263dc5410a38aefd43
|
|
| BLAKE2b-256 |
02e40476c7aaaa6ba940d223c5f278aaa3ba75b6ff7b38795f0bda2c120edf20
|
File details
Details for the file garf_google_analytics-1.0.0-py3-none-any.whl.
File metadata
- Download URL: garf_google_analytics-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a571bdc586016b0acf673dec7914814f5976bb0efb4c2d14e0b98846cf4ee863
|
|
| MD5 |
f1cc10cb538e5512be68ca011618d447
|
|
| BLAKE2b-256 |
12cef96c86ff4de667206e32750f4a33ebede3825bce82c83355b0cc8651775d
|