This release is a pre-release and may not be stable for production use.
GPSOauth Compatibility Layer
gpsoauth compatibility layer for google-api-python-client
Use Google Play Services authentication provided by gpsoauth with public Google APIs provided by google-api-python-client.
Google Play Services authenticated accounts are sometimes given special permissions, even on public APIs. This project thus aims to reduce the need for maintaining scattered wrappers around privileged private APIs when public APIs give the same privileges with gpsoauth-provided tokens.
This mini-library aims to pose as the many Android apps that Google allows access to its API. Unfortunately, not all API scopes are available for consumption on Android applications. A comprehensive list of unavailable scopes is being worked on. In the meantime, consider using Google's recommended flow of authentication for the scopes that are unavailable on any of Google's Android applications.
Usage
See https://github.com/rukins/gpsoauth-java#receiving-an-authentication-token for obtaining your account's oauth token.
from googleapiclient.discovery import build
from gpsoauth_compat import GPLogin
SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly']
API_SERVICE_NAME = 'drive'
API_VERSION = 'v3'
OAUTH_TOKEN = 'SECRET_GOES_HERE'
flow = GPLogin.from_oauth_token(OAUTH_TOKEN, SCOPES)
# alternatively use the following line if you already have authenticated before
# flow = GPLogin.from_master_token(MASTER_TOKEN, SCOPES)
credentials = flow.credentials
service = build(API_SERVICE_NAME, API_VERSION, credentials = credentials)
print(service.files().list().execute())
Metadata
Release files for gpsoauth-compat 0.1.0rc1
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 |
|---|---|---|---|---|
| gpsoauth_compat-0.1.0rc1.tar.gz | 3.9 kB | Without provenance | Details for gpsoauth_compat-0.1.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gpsoauth_compat-0.1.0rc1-py3-none-any.whl | Python 3 | none | any | Details for gpsoauth_compat-0.1.0rc1-py3-none-any.whl |
Total release size: 9.0 kB
Release files / gpsoauth_compat-0.1.0rc1.tar.gz
| Download URL | gpsoauth_compat-0.1.0rc1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5806ca412de0d9fc299d708ef4d9be05d5348cbf8ff069e0af64a170d5ea5dd5
|
|
BLAKE2b-256 checksum How to use checksums |
a0f42876cd2b78f9286e5b02dd05c5999e26e29c341a72227b994bc5352f110f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.12.6 Windows/11
|
Release files / gpsoauth_compat-0.1.0rc1-py3-none-any.whl
| Download URL | gpsoauth_compat-0.1.0rc1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce43c3d3280d2e283e4155e435e570483df31ac78a956c0892940b1bd7a97a09
|
|
BLAKE2b-256 checksum How to use checksums |
793731bc7de69ca335f837b7f69019e58eab47e8e489ee453064b5cb798252c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.12.6 Windows/11
|
Security for gpsoauth-compat 0.1.0rc1
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.