asconnect


Nameasconnect JSON
Version 3.0.4 PyPI version JSON
download
home_pagehttps://github.com/microsoft/asconnect
SummaryA wrapper around the Apple App Store Connect APIs
upload_time2024-02-21 04:10:25
maintainerNone
docs_urlNone
authorDale Myers
requires_python>=3.8,<4.0
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": ">=3.8,<4.0",
    "maintainer_email": null,
    "keywords": "apple,app store,itunes,connect",
    "author": "Dale Myers",
    "author_email": "dalemy@microsoft.com",
    "download_url": "https://files.pythonhosted.org/packages/40/ea/50b3e369e074aaff61e0b305e5e0b07c5991c97180b01ccbef5957d029e2/asconnect-3.0.4.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\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A wrapper around the Apple App Store Connect APIs",
    "version": "3.0.4",
    "project_urls": {
        "Homepage": "https://github.com/microsoft/asconnect",
        "Repository": "https://github.com/microsoft/asconnect"
    },
    "split_keywords": [
        "apple",
        "app store",
        "itunes",
        "connect"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bfafb5f27d775e0ef87c198ca47d530b43c48346cfd34611b055e66eabafa8f2",
                "md5": "5d9062738988031d73a90f0c4901f8c4",
                "sha256": "3198b48cdc257e0f196a97a698547d465587e2b3266064bda94276d89c29b478"
            },
            "downloads": -1,
            "filename": "asconnect-3.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d9062738988031d73a90f0c4901f8c4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 35346,
            "upload_time": "2024-02-21T04:10:27",
            "upload_time_iso_8601": "2024-02-21T04:10:27.284020Z",
            "url": "https://files.pythonhosted.org/packages/bf/af/b5f27d775e0ef87c198ca47d530b43c48346cfd34611b055e66eabafa8f2/asconnect-3.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "40ea50b3e369e074aaff61e0b305e5e0b07c5991c97180b01ccbef5957d029e2",
                "md5": "d3400e7a9f293a344637a6db173d5582",
                "sha256": "355c3bd32042b90d8664fbe605a86cee47b42259c2364de51dd00c5ca5e593c2"
            },
            "downloads": -1,
            "filename": "asconnect-3.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "d3400e7a9f293a344637a6db173d5582",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 24622,
            "upload_time": "2024-02-21T04:10:25",
            "upload_time_iso_8601": "2024-02-21T04:10:25.059925Z",
            "url": "https://files.pythonhosted.org/packages/40/ea/50b3e369e074aaff61e0b305e5e0b07c5991c97180b01ccbef5957d029e2/asconnect-3.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-21 04:10:25",
    "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: 0.20026s