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.5.tar.gz (6.2 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.5-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gcp_utils_sds-0.1.5.tar.gz
  • Upload date:
  • Size: 6.2 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.5.tar.gz
Algorithm Hash digest
SHA256 1ddd77ff58854f0c7edf7c3deb48d22fbfec5527556efab7ec7afcc621208cba
MD5 eb3d5409b13993f921dc81d08ec8b0a0
BLAKE2b-256 6617360ffaa36ab014d21637d4e242764dc63503540d9721bad8b53cbde61b94

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcp_utils_sds-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7d2bb140c746cfa6150b0b8bb0e07f2e267f7dd52452dbac99de944b4950092a
MD5 4e5a6bdc07716c08dbc662117a9c7e1e
BLAKE2b-256 d5c6fc6f6fec0d0a78b89a9f0707ff3e32738fe806a9b929e657e58beb92f697

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