Skip to main content

Tools for the AppStore Connect API.

Project description

appstore-tools

Tools for the AppStore Connect API.

This package provides methods to publish, download, and list information about AppStore meta-data (descriptions, keywords, screenshots, previews, etc). Combined with a deployment workflow (such as github actions), the AppStore meta-data can be tracked and deployed along side the rest of the app's source code and assets.

Install

pip install appstore-tools

Usage

appstore-tools [-h] [--version] action [args]

Examples:

# List all apps under the app store account
appstore-tools apps

# Download the assets for an app
appstore-tools download --bundle-id com.example.myapp --asset-dir myassets

# Publish the assets for an app
appstore-tools publish --bundle-id com.example.myapp --asset-dir myassets

Usage Config

Most actions will require authentication with the AppStore Connect API, as well as specifying which app to target.

All these parameters can be passed via command line argument, but for convenience, they (and any others) can also be loaded from a config file.

Use the default config file path of appstore_tools.config, or specify another with --config-file CONFIG_FILE.

; appstore_tools.config
; sample contents
issuer-id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
key-id=XXXXXXXXXX
key-file=/home/me/AppStoreConnect_AuthKey_XXXXXXXXXX.p8
bundle-id=com.example.myapp

Code

The actions provided by the command line can also be accessed by import in a python script.

# Import the package
from appstore_tools import appstore, actions

# Get the auth credentials
with open("AuthKey.p8", "r") as file:
    key = file.read()

issuer_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
key_id="XXXXXXXXXX"

# Create an access token
access_token = appstore.create_access_token(
    issuer_id=issuer_id, key_id=key_id, key=key
)

# Call the AppStore connect API
apps = appstore.get_apps(access_token=access_token)

# Or call one of the AppStore-Tools Actions
actions.list_apps(access_token=access_token)

Asset Directory Structure

The download and publish actions look for assets in the following directory structure starting at --asset-dir ASSET_DIR. Screenshots and Previews are sorted alphabetically in the store listing.

To leave an attribute unaffected by the publish action, remove the corresponding text file from the tree. An empty text file can be used to set the attribute to an empty string.

Likewise, to leave the screenshots (or previews) unaffected, remove the entire screenshots folder. If screenshots is present, the publish action will add/remove screenshot-display-types and their screenshots to match.

Additionally, filepaths can be explicitly ignored by setting a regex pattern with --asset-ignore ASSET_IGNORE.

[ASSET_DIR]
└── com.example.myapp
    └── en-US
        ├── description.txt
        ├── keywords.txt
        ├── marketingUrl.txt
        ├── name.txt
        ├── previews
        ├── privacyPolicyText.txt
        ├── privacyPolicyUrl.txt
        ├── promotionalText.txt
        ├── screenshots
           ├── APP_IPAD_PRO_129
              ├── 10_Image.png
              ├── 20_AnotherImage.png
              ├── 30_MoreImages.png
           ├── APP_IPAD_PRO_3GEN_129
              ├── a_is_the_first_letter.png
              ├── b_is_the_second_letter.png
              ├── c_is_the_third_letter.png
           ├── APP_IPHONE_55
              ├── image01.png
              ├── image02.png
              ├── image03.png
           └── APP_IPHONE_65
              ├── image01.png
              ├── image02.png
              ├── image03.png
        ├── subtitle.txt
        ├── supportUrl.txt
        └── whatsNew.txt

Source

Clone the source code

git clone https://github.com/bennord/appstore-tools.git

Install dependencies

poetry install

Run from within project environment

poetry shell
appstore-tools --version

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

appstore-tools-0.1.7.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

appstore_tools-0.1.7-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file appstore-tools-0.1.7.tar.gz.

File metadata

  • Download URL: appstore-tools-0.1.7.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0b3 CPython/3.10.6 Linux/5.15.0-52-generic

File hashes

Hashes for appstore-tools-0.1.7.tar.gz
Algorithm Hash digest
SHA256 83a195f13d57d96b618a826313a2b0611cef28b95d672af9a7dc6b75f3bef19d
MD5 80bdc54a48accc754fc486daa1d103fb
BLAKE2b-256 3129997fa7ec1b22c90cd2f23f72065172421cd21faa92cd5656d0a0aae7f5e6

See more details on using hashes here.

File details

Details for the file appstore_tools-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: appstore_tools-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0b3 CPython/3.10.6 Linux/5.15.0-52-generic

File hashes

Hashes for appstore_tools-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8b7dba2dcacae656253546eb06ad18c50edd820776dd41ea953e91083b887bbd
MD5 20b107c84de60d5fe8e8ca9d4dc210b4
BLAKE2b-256 4e9a0b5346b8599292b9c4d1f9c810f0d450b4a181ab0276b226217100bb3f30

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