Applaud – our Python client library for accessing App Store Connect is open sourced

Applaud is a Python client library for accessing App Store Connect API, generated by Applaudgen.

Features

  • Support App Store Connect API latest version 1.6
  • Support filter, fileds, include, limit, sort, exists and other query parameters
  • All endpoints / paths are implemented, include, but not limited to: App Information, TestFlight, Users and Roles, Sales and Finances
  • Pythonic, all camelCase schema fields are represented as snake_case class attributes
  • Embrace Python type hints
  • Use Python Requests to hanlde HTTP sessions
  • ErrorResponse can be catched as exception

Motivation

At Codinn, we distribute apps on App Store – Core Shell and Core Tunnel. We wrote a bunch of scripts to automate the build, package and upload processes, we benefit from the automation scripts and it saves a lot of time.

For the app information (localized descriptions, versions, changelogs and other meta data) in App Store, we maintained it manually for a very long time. But this can easily go wrong, we made a few horrible mistakes while updating the information, e.g., pasted the description of Core Shell to Core Tunnel, using Spanish changelog for English localization, forgot update site links.

We decided to adopt App Store Connect API to automate app information updating process as well, but soon discovered that it lacks client support. Most client libraries implement a very small portion of the API, provide very limited operations.

We surprisingly found that App Store Connect API uses and conforms to OpenAPI specification, it shouldn't be too hard to generate client code from the specification. So we create project Applaudgen for this purpose, and its masterpiece – project Applaud.

Examples

Here is a basic but very straightforward sample code:

import os
from applaud.connection import Connection

KEY_ID = "XXXXXXXXXX"
ISSUER_ID = "XXXXXX-XXXXXXX-XXXXXX-XXXXXXX"
PATH_TO_KEY = os.path.expanduser('path/to/your/key.p8')

with open(PATH_TO_KEY, 'r') as f:
    PRIVATE_KEY = f.read()

# Create the Connection
connection = Connection(ISSUER_ID, KEY_ID, PRIVATE_KEY)
# API Request
r = connection.users().limit(10).get()

# Print user names
for user in r.data:
    print(user.attributes.username, user.attributes.first_name, user.attributes.last_name)

For more complex example, please refer to Uploading App Previews with Applaud.

The project is licensed under MIT, feel free to fork or submit pull requests.


Yang @ Codinn

Hi Yang,

Core shell witll support python script ?

Thanks

Frankly, we didn't ever think of Python scripting with Core Shell. If you meant automation, you can use AppleScript to interact with Core Shell.

Yang

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.