Skip to main content

A helper package to use common functions

Project description

Helpful Helper

A (so far) little package that contains commonly used and useful functions. Good for team morale as they say.

About

Contents include functions for connecting to redshift and using gspread, a py library for writing and reading from google sheets. For help with what functions are available, please run get_help() after importing helpful-pys.

Official pypi

Installation

To install functional-functions, you can install it using pip:

pip install helpful-pys

Within your jupyter lab/notebook setup:

from helpful_pys import helpers

helpers.get_help()

Additional Prequisites

The package will install gspread but will require further setup to get it running. I recommend using the gspread documentation for Authentication which will allow you to authorize the google sheets API and generate a service account key.

Don't forget the client-email in your key, it will be constantly needed to give share access to sheets for usage with gspread.

I have included a creds.py.sample file in the package to allow the user to input their personal creds to use. If there are better access/security storage policies like AWS Secrets Manager, this repo can be updated to accommodate such.

Usage

This package is intended for usage with local py setups and local jupyter notebook/lab setups. It is not intended for production script usage.

q = "select * from that_table limit 100"

result_df = helpers.query_redshift(q)
gc = helper.gsheets_start()

workbook = gc.open_by_url('googlesheetsurlhere')

workbook.update_title("Really Cool and Helpful Workbook")

ws = test.worksheet('Sheet1')
ws.update_title("The coolest worksheet")


data_formatted = data[['id','helpful_id','cool_id']].copy()

ws.update([data_formatted.columns.values.tolist()] + data_formatted.values.tolist())

More gspread example use cases

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

helpful_pys-0.2.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

helpful_pys-0.2.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file helpful_pys-0.2.1.tar.gz.

File metadata

  • Download URL: helpful_pys-0.2.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for helpful_pys-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7f20edbce5d5a07aee0990764507906f9fd5630ca0e7381b9c36906c7114c205
MD5 075f3239b7f021e92626919fe5ae0051
BLAKE2b-256 8298a5b68df315cfef6ec01bce0d9de216affc8a86aeab27d38b26dab6d4628f

See more details on using hashes here.

File details

Details for the file helpful_pys-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: helpful_pys-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for helpful_pys-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd42f46c27249c33efc614905c6975b21e2abe8122c5a39a73c8a763b6db1561
MD5 1944dfab81aca4e5ea74a349ffd6b1e8
BLAKE2b-256 5ee80b7a8888f2ef2ee93283d80db03625fa24a5e734177517b64529bb3a5608

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