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.2.2.tar.gz (9.8 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.2.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gcp_utils_sds-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b6f0b608ab3d021322ca7dd7c2b1728fd1176ca3357f711b26e1baee0ff9b35b
MD5 c04e3fac62c22265f4b449430a0e493a
BLAKE2b-256 4564a6aa0313f2e9209fd9231ef700b7af34334e419696e4e6ede3766c8d89d6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gcp_utils_sds-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6bfd04579d62cc59758a451e93160154df282e47cfbe30f8fd602b50bff871e
MD5 abc665c1ba8d0a0982be3c5121d11ddb
BLAKE2b-256 c35a299fb04efe8bc4df81b943ef821dd36fecf6f2eebd4af7dde995707619f3

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