asconnect


Nameasconnect JSON
Version 3.0.6 PyPI version JSON
download
home_pagehttps://github.com/microsoft/asconnect
SummaryA wrapper around the Apple App Store Connect APIs
upload_time2024-05-30 11:42:21
maintainerNone
docs_urlNone
authorDale Myers
requires_python<4.0,>=3.8
licenseMIT
keywords apple app store itunes connect
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # asconnect

asconnect is a Python wrapper around the [Apple App Store Connect REST APIs](https://developer.apple.com/documentation/appstoreconnectapi).

This wrapper does not cover every API, but does cover the basics, including:

* Uploading a build
* Creating a new TestFlight version
* Setting TestFlight review information
* Creating a new app store version
* Setting the app review information
* Submitting for app review

## Getting Started

### Installation

The package is available on PyPI, so you can run `pip install asconnect` to get the latest version.

### Creating a client

To begin, you need to [generate a key](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api), then get it's ID, the contents of the key itself, and the issuer ID.

Once you have those, you can create a new client by running:

```python
client = asconnect.Client(key_id="...", key_contents="...", issuer_id="...")
```

### Getting your App

Most operations require an app identifier. This is not the same as the bundle ID you choose, but is an ID generated by Apple. The easiest way to get this is to run this code:

```python
app = client.app.get_from_bundle_id("com.example.my_bundle_id")
```

### Uploading a Build

Uploading a build isn't technically part of the App Store Connect APIs, but a wrapper around altool is included to make things as easy as possible. Let's upload a build for your app:

```python
client.build.upload(
  ipa_path="/path/to/the/app.ipa",
  platform=asconnect.Platform.ios,
)
```

And if you want to wait for your build to finish processing:

```python
build = client.build.wait_for_build_to_process("com.example.my_bundle_id", build_number)
```

`build_number` is the build number you gave your build when you created it. It's used by the app store to identify the build.

### App Store Submission

Let's take that build, create a new app store version and submit it,

```python
# Create a new version
version = client.app.create_new_version(version="1.2.3", app_id=app.identifier)

# Set the build for that version
client.version.set_build(version_id=version.identifier, build_id=build.identifier)

# Submit for review
client.version.submit_for_review(version_id=version.identifier)
```

It's that easy. Most of the time at least. If you don't have previous version to inherit information from you'll need to do things like set screenshots, reviewer info, etc. All of which is possible through this library.
### Phased Distribution
```python
# Create a new version
version = client.app.create_new_version(version="1.2.3", app_id=app.identifier)

# Start a versions' phased release, the initial state of which is INACTIVE
phased_release = client.version.create_phased_release(version_id=version.identifier)

# Check on a phased release
phased_release = client.version.get_phased_release(version_id=version.identifier)

# Advance or modify a phased release
phased_release = client.version.patch_phased_release(phased_release_id=phased_release.identifier, phased_release_state=PhasedReleaseState.active)
phased_release = client.version.patch_phased_release(phased_release_id=phased_release.identifier, phased_release_state=PhasedReleaseState.pause)
phased_release = client.version.patch_phased_release(phased_release_id=phased_release.identifier, phased_release_state=PhasedReleaseState.complete)

# Delete
client.version.delete_phased_release(phased_release_id=phased_release.identifier)
```
# Getting Started

For development `asconnect` uses [`poetry`](https://github.com/python-poetry/poetry)

# Contributing

This project welcomes contributions and suggestions.  Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/microsoft/asconnect",
    "name": "asconnect",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "apple, app store, itunes, connect",
    "author": "Dale Myers",
    "author_email": "dalemy@microsoft.com",
    "download_url": "https://files.pythonhosted.org/packages/92/5b/578179815799e246e020c8c93c3338751d80c52dd09804cd075db95ae895/asconnect-3.0.6.tar.gz",
    "platform": null,
    "description": "# asconnect\n\nasconnect is a Python wrapper around the [Apple App Store Connect REST APIs](https://developer.apple.com/documentation/appstoreconnectapi).\n\nThis wrapper does not cover every API, but does cover the basics, including:\n\n* Uploading a build\n* Creating a new TestFlight version\n* Setting TestFlight review information\n* Creating a new app store version\n* Setting the app review information\n* Submitting for app review\n\n## Getting Started\n\n### Installation\n\nThe package is available on PyPI, so you can run `pip install asconnect` to get the latest version.\n\n### Creating a client\n\nTo begin, you need to [generate a key](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api), then get it's ID, the contents of the key itself, and the issuer ID.\n\nOnce you have those, you can create a new client by running:\n\n```python\nclient = asconnect.Client(key_id=\"...\", key_contents=\"...\", issuer_id=\"...\")\n```\n\n### Getting your App\n\nMost operations require an app identifier. This is not the same as the bundle ID you choose, but is an ID generated by Apple. The easiest way to get this is to run this code:\n\n```python\napp = client.app.get_from_bundle_id(\"com.example.my_bundle_id\")\n```\n\n### Uploading a Build\n\nUploading a build isn't technically part of the App Store Connect APIs, but a wrapper around altool is included to make things as easy as possible. Let's upload a build for your app:\n\n```python\nclient.build.upload(\n  ipa_path=\"/path/to/the/app.ipa\",\n  platform=asconnect.Platform.ios,\n)\n```\n\nAnd if you want to wait for your build to finish processing:\n\n```python\nbuild = client.build.wait_for_build_to_process(\"com.example.my_bundle_id\", build_number)\n```\n\n`build_number` is the build number you gave your build when you created it. It's used by the app store to identify the build.\n\n### App Store Submission\n\nLet's take that build, create a new app store version and submit it,\n\n```python\n# Create a new version\nversion = client.app.create_new_version(version=\"1.2.3\", app_id=app.identifier)\n\n# Set the build for that version\nclient.version.set_build(version_id=version.identifier, build_id=build.identifier)\n\n# Submit for review\nclient.version.submit_for_review(version_id=version.identifier)\n```\n\nIt's that easy. Most of the time at least. If you don't have previous version to inherit information from you'll need to do things like set screenshots, reviewer info, etc. All of which is possible through this library.\n### Phased Distribution\n```python\n# Create a new version\nversion = client.app.create_new_version(version=\"1.2.3\", app_id=app.identifier)\n\n# Start a versions' phased release, the initial state of which is INACTIVE\nphased_release = client.version.create_phased_release(version_id=version.identifier)\n\n# Check on a phased release\nphased_release = client.version.get_phased_release(version_id=version.identifier)\n\n# Advance or modify a phased release\nphased_release = client.version.patch_phased_release(phased_release_id=phased_release.identifier, phased_release_state=PhasedReleaseState.active)\nphased_release = client.version.patch_phased_release(phased_release_id=phased_release.identifier, phased_release_state=PhasedReleaseState.pause)\nphased_release = client.version.patch_phased_release(phased_release_id=phased_release.identifier, phased_release_state=PhasedReleaseState.complete)\n\n# Delete\nclient.version.delete_phased_release(phased_release_id=phased_release.identifier)\n```\n# Getting Started\n\nFor development `asconnect` uses [`poetry`](https://github.com/python-poetry/poetry)\n\n# Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A wrapper around the Apple App Store Connect APIs",
    "version": "3.0.6",
    "project_urls": {
        "Homepage": "https://github.com/microsoft/asconnect",
        "Repository": "https://github.com/microsoft/asconnect"
    },
    "split_keywords": [
        "apple",
        " app store",
        " itunes",
        " connect"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a20f25cb6afd351f9834ca4b7f032c66cb3e34a6dc51528108b3f8e0ded54132",
                "md5": "7468ed373ff29d9f676083ace3b2b0d2",
                "sha256": "5c42a3afbd76ce5919025c68faf13966064434dc0de23bbd10686d7219c4b045"
            },
            "downloads": -1,
            "filename": "asconnect-3.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7468ed373ff29d9f676083ace3b2b0d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 35531,
            "upload_time": "2024-05-30T11:42:19",
            "upload_time_iso_8601": "2024-05-30T11:42:19.704865Z",
            "url": "https://files.pythonhosted.org/packages/a2/0f/25cb6afd351f9834ca4b7f032c66cb3e34a6dc51528108b3f8e0ded54132/asconnect-3.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "925b578179815799e246e020c8c93c3338751d80c52dd09804cd075db95ae895",
                "md5": "d15e69113216a8ce55c4a58dd4967c57",
                "sha256": "ed332c81be8ee8fe807cb1df123a3d74bf70367f8ab3ef22d8b8e5e1cbe4c1a0"
            },
            "downloads": -1,
            "filename": "asconnect-3.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "d15e69113216a8ce55c4a58dd4967c57",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 25057,
            "upload_time": "2024-05-30T11:42:21",
            "upload_time_iso_8601": "2024-05-30T11:42:21.376640Z",
            "url": "https://files.pythonhosted.org/packages/92/5b/578179815799e246e020c8c93c3338751d80c52dd09804cd075db95ae895/asconnect-3.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-30 11:42:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "microsoft",
    "github_project": "asconnect",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "asconnect"
}
        
Elapsed time: 1.74645s