Skip to main content

Client library for AppStore Connect Analytics API

Project description

GitHub GitHub Workflow Status (with branch) Coverage PyPI - Downloads PyPI

Introduction

This is a Python library for the AppStore Analytics API and allows you to easily access the analytics data of your python apps.

Installation

pip install surquest-utils-appstoreconnect-analytics-api

Usage

import datetime as dt
from surquest.utils.appstoreconnect.analytics import (
    Client as AppStoreConnectClient,
    Analytics as AppStoreConnectAnalytics,
    Formatter,
    Frequency,
    Measures,
    Dimension,
)

# Create client
client = AppStoreConnectClient(
    mayacinfo="ADD-YOUR-MYACINFO", # is a Cookie value from https://appstoreconnect.apple.com/
)

# Create analytics object
analytics = AppStoreConnectAnalytics(
    client=client
)

# Get time series data
data = analytics.get_time_series(
    app_ids=["ADD-YOUR-APP-ID"],
    measure=Measures.INSTALLS,
    start_date=dt.date(2021, 1, 1),
    end_date=dt.date(2021, 1, 31),
    grouping=Group.COUNTRY
    frequency=Frequency.DAY,
    )

print("YOUR DATA:", data)

Development

docker build `
     --tag surquest/utils/appstoreconnect:dev `
     --file package.base.dockerfile `
     --target test .

docker run --rm -it `
 -v "${pwd}:/opt/project" `
 -w "/opt/project/test" `
 -e "APPID={ADD-YOUR-APP-ID}" `
 -e "MYACINFO={ADD-YOUR-MYACINFO}" `
 surquest/utils/appstoreconnect:dev pytest

License

This project is licensed under the terms of the MIT license.

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

Built Distribution

File details

Details for the file surquest_utils_appstoreconnect_analytics_api-0.0.1rc1.tar.gz.

File metadata

File hashes

Hashes for surquest_utils_appstoreconnect_analytics_api-0.0.1rc1.tar.gz
Algorithm Hash digest
SHA256 2afea865ed692df8179a289dfb812f405ef11021e34bce8ccb061704efd99ee1
MD5 b1bebf76eac413e93213888501c28ce2
BLAKE2b-256 1464dc1d84af4938a2db13b994b1b84ad714168f8e097a933763e8e76057a68b

See more details on using hashes here.

File details

Details for the file surquest_utils_appstoreconnect_analytics_api-0.0.1rc1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for surquest_utils_appstoreconnect_analytics_api-0.0.1rc1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a861175a77ad0f42f98a3eb2f3795e6f96188044d366e7dfe56619e584e7e6b3
MD5 b07be766217ebe83ee93a5b6ceda0b43
BLAKE2b-256 ff0b7acf6520fda510e91dd1f8bf8e2bdcdce72196d535ada4cdb54144284224

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page