One package that will handle the installation and client generation for the most used GCP Python Client Libraries + methods that avoid repetitive processes.
Project description
GCP Python Client Functions
Installation
Launch a terminal and install by entering:
conda install gcp_python_client_functions
…or
pip install gcp_python_client_functions
Usage Prerequisites
1. GCP environment
- Create a GCP project by going to the Resource Manager page in the cloud console (cloud resources naming convention).
- Enable billing for the project you’ll work with by going to the Cloud Billing page and selecting your project on the top right corner (300 USD free credits are associated with new billing accounts + a big list of free tier products).
- Enable BigQuery API by going to APIs & Services page on the cloud console and looking for the BigQuery API.
2. Authentication
Authenticating by… - (locally) using the Google Cloud SDK(installation needed). Launch a terminal enter:
gcloud auth login --update-adc
- (elsewhere) downloading a service account JSON keyfile and point to it using an environment variable:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/keyfile.json"
- or through Workflow Identity Provider (what we used to authenticate within GitHub Actions, see Cloud Advocate’s video and stackoverflow question for additional support).
How to use
from gcp_python_client_functions.clients import *
PROJECT_ID = 'dz-learning-d'
# BigQuery
bq_obj = BigQuery(PROJECT_ID)
# Cloud Storage
stg_obj = Storage(PROJECT_ID)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gcp-python-client-functions-0.0.1.tar.gz.
File metadata
- Download URL: gcp-python-client-functions-0.0.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d437a6e00af8d073f2822011bed9582461ec9302f00c43cb43e1172d48b9d63b
|
|
| MD5 |
253070e554981e2186aeacff8e85c5d9
|
|
| BLAKE2b-256 |
bfaf9b4ce83f85009dc4fd020e03d7a54929add9cd5176e1d73e8b8949932080
|
File details
Details for the file gcp_python_client_functions-0.0.1-py3-none-any.whl.
File metadata
- Download URL: gcp_python_client_functions-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6e2f387f79b1ebb37354c9fa22a495cd8b5015395a1e3749ef208fa0ee055fd
|
|
| MD5 |
c71a8e1556f2a6d10ff1c9f731e6b2f9
|
|
| BLAKE2b-256 |
0056d6a21ad98843a27cbae583fa7932bf55f742b8ad3826356ef65f9025e52d
|