Skip to main content

This is an attempt at a usable python library to query report data from Adobe Analytics 1.4 API.

Project description

easyAdobeAnalytics

This is an attempt at a usable python library to query report data from Adobe Analytics 1.4 API.

Installation

Install the package using:

pip install easyAdobeAnalytics

You can also find the package on PyPI.

How it works

  • For authentication, you need to retrieve an access token from Adobe using client id and client secret.
  • First step is generating a json structure required by Adobe for querying data.
  • Depending upon if you need segments to be queried individually or not, generate the required number of report descriptions.
  • Next, we submit these reports to Adobe Analytics to ready the reports for us.
  • Once the report is queried, Adobe returns us a report_id which we can use to track it's status.
  • If report is not ready yet, we keep checking until it's ready and data is available to be consumed.
  • Once the report is ready (depending upon the size of data), we get the actual report data using the report_id.
  • Finally we concatenate all the report data returned to create a single dataframe.

How to use

All the functionality is behind the query_and_retrieve function in the package. Define all the variables required and pass it on. Leave the variable as empty list for elements,metrics,segments in case you don't wish to provide one for a report.

Example:

from easyAdobeAnalytics import query_and_retrieve

def easy_example():
    client_id = '<your-client-id>'
    client_secret = '<your-client-secret'
    company_id = 'company_id'
    rsid = "report_suite_id"
    elements = ['element_id_1','element_id_2']
    
    metrics = ['metric_id_1','metric_id_2']
    
    segments = ['segment_id_1','segment_id_2']
    query_segments_individually = False # True in case you want each segment to be queried individually.
    date_from = '2024-12-3'
    date_to = '2024-12-17'
    date_granularity = "Day" # Month, Year
    report_data = query_and_retrieve(client_id,
                                     client_secret,
                                     elements,
                                     metrics,segments,
                                     rsid,date_from,
                                     date_to,
                                     date_granularity,
                                     company_id,
                                     query_segments_individually)
    print(report_data.head())

if __name__ == '__main__':
    easy_example()

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

easyadobeanalytics-1.0.3.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

easyadobeanalytics-1.0.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file easyadobeanalytics-1.0.3.tar.gz.

File metadata

  • Download URL: easyadobeanalytics-1.0.3.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for easyadobeanalytics-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c3cc7df1a1a80d6fc98471baab195246e319cdc68a511dc8b526c7f9aa570112
MD5 cc72f233d62cea8517655c10a8166404
BLAKE2b-256 efe7537111f13e6d6d9f7b0c02c854e74c721d4b1311764c536637f1142d5011

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyadobeanalytics-1.0.3.tar.gz:

Publisher: python-publish.yml on varnitsingh/easyAdobeAnalytics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyadobeanalytics-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for easyadobeanalytics-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 47db89d81b352eeefa77cd840ac50786bb3176ca52dc8ea1a87cc9751b7a3084
MD5 8e5c0e9f021fcc77f1b21d40e3020453
BLAKE2b-256 692e49fb0ab00f69b0778a3f81ce854e818d34adb3cfab5d9b22f0908b34d83b

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyadobeanalytics-1.0.3-py3-none-any.whl:

Publisher: python-publish.yml on varnitsingh/easyAdobeAnalytics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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