Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miraculixx/android-play-publisher

Android Play publisher for python
https://github.com/miraculixx/android-play-publisher

Last synced: 8 days ago
JSON representation

Android Play publisher for python

Awesome Lists containing this project

README

        

This package adopted from Google Play Developer Publishing API samples
at https://github.com/googlesamples/android-play-publisher-api.git

This is a Python only package. Currently only the upload command is
fully supported although all other commands form the samples should work
without modification.

# Google Play Developer Publishing API samples

A collection of command-line samples for the Play Developer Publishing API.

## Installation

1. Download Google APIs Client Library for Python (google-api-python-client):
https://code.google.com/p/google-api-python-client/

or use pip:

```bash
$ pip install google-api-python-client
```

2. Make sure you can import the client library:

```bash
$ python
>>> import apiclient
>>>
```

## First request using OAuth2: Installed application

1. Edit the `client_secrets.json` file and add the client ID and client secret
(or use --secrets /path/to/client_secrets-json)

2. Upload apk

```bash
$ python -m publisher.upload --secrets /path/to/secrets.json /path/to/signed-aligned-apk --package com.example.app
```

A browser window will open and ask you to login. Make sure the account has
enough permissions in the Google Play Developer console.

3. Accept the permissions dialog. The browser should display

`The authentication flow has completed.`

Close the window and go back to the shell.

4. The script will upload a list of apks.

5. The tokens will be stored in `androidpublisher.dat`. Remove this file to restart the
auth flow.

## First request using OAuth2: Service accounts

1. Edit `basic_list_apks_service_account.py` and add the service account Email
address.

2. Copy the service account key file, generated in the Google APIs Console into
the same directory and rename it to `key.p12`.

3. Execute the script:

```bash
$ python basic_list_apks_service_account.py com.myapp.package
```

4. The script will output a list of apks.