Skip to main content

A simple Python package which provides supplementary helper methods for gspread.

Project description

gspread_helpers

PyPI Download Workflow Python Version

Overview

A simple Python package which provides supplementary helper methods for gspread.

Links

Official Documentation

Features

  • gspread_helpers.RangeName method for automatically generating dynamic range names, e.g. "A1:R455"

Installation

$ pip install gspread-helpers

Directory

gspread_helpers
├── __init__.py
└── range_name
    ├── __init__.py
    ├── exceptions.py
    ├── range_name.py
    └── validations.py

Usage

The row limit for range names in Microsoft Excel is, by default, 1,048,576. Below, we override that limitation using the override_col_limit argument set to True and by setting source equal to 'excel'.

from gspread_helpers import RangeName


rn = RangeName(
    rows=2, cols=1_048_580, override_col_limit=True, source="excel"
)

However, we could have also updated the EXCEL_ROW_LIMIT constant instead.

from gspread_helpers import EXCEL_ROW_LIMIT


EXCEL_ROW_LIMIT = 1_048_580
rn = RangeName(rows=2, cols=1_048_580, source="excel")

Modulating the header_rows_size argument looks like this.

rn = RangeName(rows=2, cols=2, header_rows_size=2)

Finally, if we want to buffer the range name beginning from 'B', we may do this.

rn = RangeName(rows=2, cols=2, buffer=1)

Passing 'B' to buffer is equivalent to passing 1.

rn = RangeName(rows=2, cols=2, buffer="B")

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

gspread_helpers-0.0.20.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

gspread_helpers-0.0.20-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file gspread_helpers-0.0.20.tar.gz.

File metadata

  • Download URL: gspread_helpers-0.0.20.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.6 Darwin/23.4.0

File hashes

Hashes for gspread_helpers-0.0.20.tar.gz
Algorithm Hash digest
SHA256 c36b927724114d7622e0a9c8cf87f8b7df75e0e033003e1ec71df1e4be08c516
MD5 825c6ff9e2fdd3a27cf14698d3810df1
BLAKE2b-256 481fd4f41d7668599a3164dc6912b798d39415f182c41bb0209415f5e2fb57e9

See more details on using hashes here.

File details

Details for the file gspread_helpers-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: gspread_helpers-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.6 Darwin/23.4.0

File hashes

Hashes for gspread_helpers-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 89d58bc9209bd69f7e08f9eb8af10794fc1ee5264df144357a9536acb9c64fe8
MD5 b6ece2db17291f8a5d6a56b2e9c3630f
BLAKE2b-256 09fb5c37b5ce72c2fbb94c555a3b4a2e032a5867b0a1aa10bfe181fb21945e5c

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