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
│ └── IPHONE_65
│ ├── video.mp4
│ └── video.mp4.json
├── 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
Additional attributes for media files can be set by placing a json file with a matching base file name along side the media file. For example, the contents of video.mp4.json (along side video.mp4) could look like this:
{
"previewFrameTimeCode": "00:00:14:01"
}
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
Metadata
Release files for appstore-tools 0.1.8
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 |
|---|---|---|---|---|
| appstore-tools-0.1.8.tar.gz | 24.4 kB | Without provenance | Details for appstore-tools-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| appstore_tools-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for appstore_tools-0.1.8-py3-none-any.whl |
Total release size: 52.7 kB
Release files / appstore-tools-0.1.8.tar.gz
| Download URL | appstore-tools-0.1.8.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65a7ce6882b24e773045a47dad505d211c845d8a999cfcd1fedd70ce889d7b9a
|
|
BLAKE2b-256 checksum How to use checksums |
1667bcc1687c65918078aab71ae616f7af9c23b1cb9cf991cee7f3ab1ae06a0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0b3 CPython/3.10.6 Linux/5.15.0-52-generic
|
Release files / appstore_tools-0.1.8-py3-none-any.whl
| Download URL | appstore_tools-0.1.8-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45b405941a2f14262b9440e76d38788a32c2941c1ba69bebfaa70723769a06ec
|
|
BLAKE2b-256 checksum How to use checksums |
856c6eaede13bfca066a6bf48ef6aab95785c543806c584962ef1dca75c6aac0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0b3 CPython/3.10.6 Linux/5.15.0-52-generic
|
Security for appstore-tools 0.1.8
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.