Garpun Authentication Library
Project description
This library simplifies using Garpun’s various server-to-server authentication mechanisms to access Garpun APIs.
Installing
You can install using pip:
$ pip install garpunauth
Supported Python Versions
Python >= 3.6
Using
# Use it for first auth with your scopes
from garpunauth.client import GarpunCredentials
credentials, project_id = GarpunCredentials.authenticate_user(['cloud-platform'])
print(u"credentials.access_token = %s" % str(credentials.access_token))
print(u"credentials.access_token_expired = %s" % str(credentials.access_token_expired))
print(u"credentials.refresh_token = %s" % str(credentials.refresh_token))
# Refresh access_token if it expired
GarpunCredentials.refresh_credentials(credentials)
print(u"credentials.access_token = %s" % str(credentials.access_token))
For contributors
Use make black for blacken the code
Use nox for run tests and other checks
Set PyCharm default test runner to pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
garpunauth-0.0.7.tar.gz
(8.5 kB
view details)
Built Distribution
File details
Details for the file garpunauth-0.0.7.tar.gz
.
File metadata
- Download URL: garpunauth-0.0.7.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b91da7e6f53f3f03caa28984982455fd53d20173ddc5a9c4748aea38cd53f7c0 |
|
MD5 | 2ca63af07a79aa1a6a06c18a60eb836a |
|
BLAKE2b-256 | c2c2b6cc5329bdd2b02912ffae0108440b68e1e842fe967a59f3d0abf961875a |
File details
Details for the file garpunauth-0.0.7-py2.py3-none-any.whl
.
File metadata
- Download URL: garpunauth-0.0.7-py2.py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94e8b4dc8bb52617a41891578fd5f861060c5430a9b3e2905da1dd8ac1d8a39e |
|
MD5 | 3781591c414633bd36afbe1d6a5e8084 |
|
BLAKE2b-256 | 7b0001cb0f102ad3aed6804123f76f9d5c127ea4512d0e6756f1ce9696c08500 |