Utilities functions for interacting with GCP tools
Project description
gcp_utils
Utilities for working with Google Cloud Platform (GCP). Written in an effort to keep re-useable functions to a singular package.
Installation
pip install gcp_utils
Features
- Upload and read CSVs from Google Cloud Storage
- Access secrets from Google Secret Manager
- Combine current and previous year GCS data
Example Usage
from gcp_utils import send_to_gcs, read_gcs_csv_to_df, access_secret_version, load_and_append_previous_year
# Upload a DataFrame to GCS
send_to_gcs('my-bucket', 'data/', my_dataframe, 'file.csv')
# Read a CSV from GCS
df = read_gcs_csv_to_df('gs://my-bucket/data/file.csv')
# Access a secret
creds = access_secret_version('my-project', 'my-secret')
# Combine current and previous year data
df = load_and_append_previous_year('my-bucket', 'etl/incoming/2024_file.csv')
License
MIT
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
gcp_utils_sds-0.1.3.tar.gz
(4.9 kB
view details)
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_utils_sds-0.1.3.tar.gz.
File metadata
- Download URL: gcp_utils_sds-0.1.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
298da89ba2c40c53cda6bd4e4dd18d329652a8cfee7687407151660d6c11f063
|
|
| MD5 |
c5d814813cd7ecf8648af9e6390cd09f
|
|
| BLAKE2b-256 |
fbd2654a1bc549fcc967ca3eddac01f4aeb53419bbb516cde38898e9e6de2064
|
File details
Details for the file gcp_utils_sds-0.1.3-py3-none-any.whl.
File metadata
- Download URL: gcp_utils_sds-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d68707b0fcedf9c56269991bec86c6a81766d6185a63cf8cdebe48ae589b9284
|
|
| MD5 |
2ff324e9d9a606ef226c955e81ff202e
|
|
| BLAKE2b-256 |
38a86366296a6b23e17f478c6263fdeb28c5005f7c783dae2c8ccbf9e8379d73
|