Utility 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.2.5.tar.gz
(14.3 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.2.5.tar.gz.
File metadata
- Download URL: gcp_utils_sds-0.2.5.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dfaba748b8cf53d8b63c7cc51c42f98d2008cfcf4a6f8fdb1776804cb152585
|
|
| MD5 |
bbd44057955d6217117e7251b3760dc6
|
|
| BLAKE2b-256 |
c91de86134738ed2f82999c4d4d2e48a384ea4d22cf707a0c9f354c0e2796b4c
|
File details
Details for the file gcp_utils_sds-0.2.5-py3-none-any.whl.
File metadata
- Download URL: gcp_utils_sds-0.2.5-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d0fdd323d9dc041ea7142038e99bfe00209b15b7067c5f0966dbcce22d7ffcd
|
|
| MD5 |
e8f7b17ee633de058c7e758f5acf9d6e
|
|
| BLAKE2b-256 |
c377f6f773e8c7fdeaf20d63f2fc1d9450229abe733af614d4455bc3508cdd24
|