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 |
Metadata
Release files for garf-google-analytics 1.0.0
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_google_analytics-1.0.0.tar.gz | 5.2 kB | Without provenance | Details for garf_google_analytics-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| garf_google_analytics-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for garf_google_analytics-1.0.0-py3-none-any.whl |
Total release size: 13.9 kB
Release files / garf_google_analytics-1.0.0.tar.gz
| Download URL | garf_google_analytics-1.0.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b56cf93885df2b44ecf379f344a8682b1330309e335d9561a94377aeb22fd42
|
|
BLAKE2b-256 checksum How to use checksums |
02e40476c7aaaa6ba940d223c5f278aaa3ba75b6ff7b38795f0bda2c120edf20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.4
|
Release files / garf_google_analytics-1.0.0-py3-none-any.whl
| Download URL | garf_google_analytics-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a571bdc586016b0acf673dec7914814f5976bb0efb4c2d14e0b98846cf4ee863
|
|
BLAKE2b-256 checksum How to use checksums |
12cef96c86ff4de667206e32750f4a33ebede3825bce82c83355b0cc8651775d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.4
|
Security for garf-google-analytics 1.0.0
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.