# gspread_helpers
[![PyPI Download](https://img.shields.io/pypi/v/gspread-helpers?logo=pypis.svg)](https://pypi.org/project/gspread-helpers/)
[![Workflow](https://img.shields.io/github/actions/workflow/status/michaelthomasletts/gspread-helpers/push_pullrequest.yml?logo=github)](https://github.com/michaelthomasletts/gspread-helpers/actions/workflows/push_pullrequest.yml)
![Python Version](https://img.shields.io/pypi/pyversions/gspread-helpers?style=pypi)
## Overview
A simple Python package which provides supplementary helper methods for [gspread](https://github.com/burnash/gspread).
## Features
- `gspread_helpers.RangeName` method for automatically generating dynamic range names, e.g. "A1:R455"
## Installation
```bash
$ 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'.
```python
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.
```python
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.
```python
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.
```python
rn = RangeName(rows=2, cols=2, buffer=1)
```
Passing 'B' to `buffer` is equivalent to passing 1.
```python
rn = RangeName(rows=2, cols=2, buffer="B")
```
## Contributing
Please refer to [contributing.md](https://github.com/michaelthomasletts/gspread-helpers/blob/main/docs/contributing.md) for step by step instructions for contributing to this project and understanding the coding standards before opening a pull request.
Raw data
{
"_id": null,
"home_page": "https://github.com/michaelthomasletts/gspread-helpers",
"name": "gspread-helpers",
"maintainer": "Michael Letts",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "lettsmt@gmail.com",
"keywords": "gspread, gspread-helpers, gspread_helpers",
"author": "Michael Letts",
"author_email": "lettsmt@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/64/72/3bb794a9fc8b013d4c7814ec52ab614679ff75d7973921fbe35f3b6557e3/gspread_helpers-0.0.18.tar.gz",
"platform": null,
"description": "# gspread_helpers\n[![PyPI Download](https://img.shields.io/pypi/v/gspread-helpers?logo=pypis.svg)](https://pypi.org/project/gspread-helpers/)\n[![Workflow](https://img.shields.io/github/actions/workflow/status/michaelthomasletts/gspread-helpers/push_pullrequest.yml?logo=github)](https://github.com/michaelthomasletts/gspread-helpers/actions/workflows/push_pullrequest.yml)\n![Python Version](https://img.shields.io/pypi/pyversions/gspread-helpers?style=pypi)\n\n## Overview\n\nA simple Python package which provides supplementary helper methods for [gspread](https://github.com/burnash/gspread).\n\n## Features\n- `gspread_helpers.RangeName` method for automatically generating dynamic range names, e.g. \"A1:R455\"\n\n## Installation\n\n```bash\n$ pip install gspread-helpers\n```\n\n## Directory\n\n```\ngspread_helpers\n\u251c\u2500\u2500 __init__.py\n\u2514\u2500\u2500 range_name\n \u251c\u2500\u2500 __init__.py\n \u251c\u2500\u2500 exceptions.py\n \u251c\u2500\u2500 range_name.py\n \u2514\u2500\u2500 validations.py\n```\n\n## Usage\n\nThe 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'.\n\n```python\nfrom gspread_helpers import RangeName\n\n\nrn = RangeName(\n rows=2, cols=1_048_580, override_col_limit=True, source=\"excel\"\n)\n```\n\nHowever, we could have also updated the `EXCEL_ROW_LIMIT` constant instead.\n\n```python\nfrom gspread_helpers import EXCEL_ROW_LIMIT\n\n\nEXCEL_ROW_LIMIT = 1_048_580\nrn = RangeName(rows=2, cols=1_048_580, source=\"excel\")\n```\n\nModulating the `header_rows_size` argument looks like this.\n\n```python\nrn = RangeName(rows=2, cols=2, header_rows_size=2)\n```\n\nFinally, if we want to buffer the range name beginning from 'B', we may do\nthis.\n\n```python\nrn = RangeName(rows=2, cols=2, buffer=1)\n```\n\nPassing 'B' to `buffer` is equivalent to passing 1.\n\n```python\nrn = RangeName(rows=2, cols=2, buffer=\"B\")\n```\n\n## Contributing\n\nPlease refer to [contributing.md](https://github.com/michaelthomasletts/gspread-helpers/blob/main/docs/contributing.md) for step by step instructions for contributing to this project and understanding the coding standards before opening a pull request.",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple Python package which provides supplementary helper methods for gspread.",
"version": "0.0.18",
"project_urls": {
"Homepage": "https://github.com/michaelthomasletts/gspread-helpers",
"Repository": "https://github.com/michaelthomasletts/gspread-helpers"
},
"split_keywords": [
"gspread",
" gspread-helpers",
" gspread_helpers"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1f6adebd9bcf44a99fe66be7ba89045fd9d6eb30077be4ea71b48b6358130daa",
"md5": "69abf3288d4769a371d46a0fb3e54159",
"sha256": "3eeabeb7f83f096667e6b81e140624404468b6cdd943970a04a6b0a0bd049d72"
},
"downloads": -1,
"filename": "gspread_helpers-0.0.18-py3-none-any.whl",
"has_sig": false,
"md5_digest": "69abf3288d4769a371d46a0fb3e54159",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6947,
"upload_time": "2025-01-14T09:18:02",
"upload_time_iso_8601": "2025-01-14T09:18:02.466297Z",
"url": "https://files.pythonhosted.org/packages/1f/6a/debd9bcf44a99fe66be7ba89045fd9d6eb30077be4ea71b48b6358130daa/gspread_helpers-0.0.18-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "64723bb794a9fc8b013d4c7814ec52ab614679ff75d7973921fbe35f3b6557e3",
"md5": "6335057fb3704a12878d72eb50218617",
"sha256": "bc3010e4df3a414439903972839f4edd338ecca32b3174c1d9f3c435030bbc64"
},
"downloads": -1,
"filename": "gspread_helpers-0.0.18.tar.gz",
"has_sig": false,
"md5_digest": "6335057fb3704a12878d72eb50218617",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 5016,
"upload_time": "2025-01-14T09:18:04",
"upload_time_iso_8601": "2025-01-14T09:18:04.702950Z",
"url": "https://files.pythonhosted.org/packages/64/72/3bb794a9fc8b013d4c7814ec52ab614679ff75d7973921fbe35f3b6557e3/gspread_helpers-0.0.18.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-14 09:18:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "michaelthomasletts",
"github_project": "gspread-helpers",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gspread-helpers"
}