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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gcp_utils_sds-0.1.1.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

Hashes for gcp_utils_sds-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e4acf37ff07b71bf3ea6cd7a0a3498e2c6966fa0398d7db69234760686174f3f
MD5 c47acf38597034e22fb1a46b26b5f7aa
BLAKE2b-256 4fdc01b1bd5029ed22ef40f33199248c7e8cba67a089468cec32c5645220e7bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcp_utils_sds-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9ad3a0448b4e8837e699f1593cb25bbb5b9ac36d1776beb3dbfb1464f798600
MD5 a6c48a4f7cd764c2365559d0e9b4f3bc
BLAKE2b-256 c79840f2d0e15190e4dcf4dc6718bf71bfab3cc4110223e7f6f58225f5c74bd1

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