Skip to main content

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


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.6.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcp_utils_sds-0.1.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file gcp_utils_sds-0.1.6.tar.gz.

File metadata

  • Download URL: gcp_utils_sds-0.1.6.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gcp_utils_sds-0.1.6.tar.gz
Algorithm Hash digest
SHA256 efe505d185ee331e8923c596420738975f895982543707e90f60c0f1d8e5ee50
MD5 b37146384b8870dfc810db4a466fb5c7
BLAKE2b-256 b5554b20ef30c54b8169239dbb362e1305f5117eea2035ecc2a2fccc741b3d4b

See more details on using hashes here.

File details

Details for the file gcp_utils_sds-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: gcp_utils_sds-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gcp_utils_sds-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 787652c562e16f5463c7b54e49c7c7cb4786dd76bfca5d7933a03f926bac5f90
MD5 d8142f6200661718fc32b3d9d0e13e42
BLAKE2b-256 027412b6fca7272bcf3a3242bdc5189bf0d63cea37888f00b19f3969582cda9d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page