# Spreadsheet Manager
**Spreadsheet Manager** is a lightweight Python package designed for loading and managing data from Google Sheets, fetching data from all tabs within the file. This package provides a simple interface for accessing and storing tabular data in JSON format.
---
## Features
- **Load All Tabs**: Fetch data from all tabs within a spreadsheet automatically.
- **Easy to Use**: Minimal setup to integrate into your projects.
- **Lightweight**: No unnecessary dependencies—uses only `pandas` and `json`.
---
## Installation
You can install **Spreadsheet Manager** via pip:
```bash
pip install spreadsheet-manager
```
---
## Usage
### Initializing the Manager
```python
from spreadsheet_manager import SheetsManager
# Initialize the SheetsManager with your Google Sheet ID
sheet_id = "your_google_sheet_id"
manager = SheetsManager(sheet_id)
```
The `SheetsManager` will automatically load all data from all tabs in the spreadsheet upon initialization.
### Accessing the Loaded Data
```python
# Access the loaded data as a dictionary
print(manager.get_data()) # Dictionary where keys are tab names and values are the tab data
```
---
## Getting the Sheet ID and Generating the URL
To use a Google Sheet with this package, you need the **Sheet ID**. Follow these steps:
### Step 1: Open the Google Sheet
1. Go to [Google Sheets](https://sheets.google.com/) and open your spreadsheet.
### Step 2: Retrieve the Sheet ID from the Publish to Web Dialog
1. Click on `File` in the top menu.
2. Select `Share` > `Publish to the web`.
3. In the dialog that opens, you will see the **Sheet ID** in the generated URL. It looks like this:
```
https://docs.google.com/spreadsheets/d/{SHEET_ID}/pub?output=xlsx
```
4. Copy the part between `/d/` and `/pub`—this is your **Sheet ID**.
### Step 3: Publish the Google Sheet
1. In the same dialog, choose:
- **Entire Document**: To make all tabs available.
- **Microsoft Excel (.xlsx)** as the file format.
2. Click `Publish` and confirm your choice.
### Important Warning
- **Public Access**: Publishing makes the spreadsheet accessible to anyone with the link.
- **Read-Only**: Others can download the file but cannot directly edit it.
---
## Requirements
- Python 3.7+
- pandas
---
## Contributing
Contributions are welcome! If you encounter bugs, have feature requests, or want to contribute code, feel free to submit issues and pull requests on GitHub.
---
## License
**Spreadsheet Manager** is licensed under the MIT License. See the LICENSE file for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "spreadsheet-manager",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, google-sheets, excel, spreadsheet, spreadsheet manager, google sheets loader, excel loader",
"author": "Yan Sido",
"author_email": "yansido1@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/44/a2/9989bd9a19f001f19ffc46309c5b4c16ab721bf4b6af77f269e5670449f4/spreadsheet_manager-0.0.4.tar.gz",
"platform": null,
"description": "\n# Spreadsheet Manager\n\n**Spreadsheet Manager** is a lightweight Python package designed for loading and managing data from Google Sheets, fetching data from all tabs within the file. This package provides a simple interface for accessing and storing tabular data in JSON format.\n\n---\n\n## Features\n\n- **Load All Tabs**: Fetch data from all tabs within a spreadsheet automatically.\n- **Easy to Use**: Minimal setup to integrate into your projects.\n- **Lightweight**: No unnecessary dependencies\u2014uses only `pandas` and `json`.\n\n---\n\n## Installation\n\nYou can install **Spreadsheet Manager** via pip:\n\n```bash\npip install spreadsheet-manager\n```\n\n---\n\n## Usage\n\n### Initializing the Manager\n\n```python\nfrom spreadsheet_manager import SheetsManager\n\n# Initialize the SheetsManager with your Google Sheet ID\nsheet_id = \"your_google_sheet_id\"\nmanager = SheetsManager(sheet_id)\n```\n\nThe `SheetsManager` will automatically load all data from all tabs in the spreadsheet upon initialization.\n\n### Accessing the Loaded Data\n\n```python\n# Access the loaded data as a dictionary\nprint(manager.get_data()) # Dictionary where keys are tab names and values are the tab data\n```\n\n---\n\n## Getting the Sheet ID and Generating the URL\n\nTo use a Google Sheet with this package, you need the **Sheet ID**. Follow these steps:\n\n### Step 1: Open the Google Sheet\n\n1. Go to [Google Sheets](https://sheets.google.com/) and open your spreadsheet.\n\n### Step 2: Retrieve the Sheet ID from the Publish to Web Dialog\n\n1. Click on `File` in the top menu.\n2. Select `Share` > `Publish to the web`.\n3. In the dialog that opens, you will see the **Sheet ID** in the generated URL. It looks like this:\n ```\n https://docs.google.com/spreadsheets/d/{SHEET_ID}/pub?output=xlsx\n ```\n4. Copy the part between `/d/` and `/pub`\u2014this is your **Sheet ID**.\n\n### Step 3: Publish the Google Sheet\n\n1. In the same dialog, choose:\n - **Entire Document**: To make all tabs available.\n - **Microsoft Excel (.xlsx)** as the file format.\n2. Click `Publish` and confirm your choice.\n\n### Important Warning\n\n- **Public Access**: Publishing makes the spreadsheet accessible to anyone with the link.\n- **Read-Only**: Others can download the file but cannot directly edit it.\n\n---\n\n## Requirements\n\n- Python 3.7+\n- pandas\n\n---\n\n## Contributing\n\nContributions are welcome! If you encounter bugs, have feature requests, or want to contribute code, feel free to submit issues and pull requests on GitHub.\n\n---\n\n## License\n\n**Spreadsheet Manager** is licensed under the MIT License. See the LICENSE file for more details.\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package to load and manage Google Sheets or Excel file data.",
"version": "0.0.4",
"project_urls": null,
"split_keywords": [
"python",
" google-sheets",
" excel",
" spreadsheet",
" spreadsheet manager",
" google sheets loader",
" excel loader"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "01abea9950ba26c7de50f04728e04326569d13fc389ba386988a513ea2fed091",
"md5": "a6b423020237ea579ee1f96c34cdc3ab",
"sha256": "34476c5c870d910cd49127983b9b7d9a6b5990bc7651975691dfe44fffe8a537"
},
"downloads": -1,
"filename": "spreadsheet_manager-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a6b423020237ea579ee1f96c34cdc3ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4990,
"upload_time": "2024-12-31T08:46:30",
"upload_time_iso_8601": "2024-12-31T08:46:30.074131Z",
"url": "https://files.pythonhosted.org/packages/01/ab/ea9950ba26c7de50f04728e04326569d13fc389ba386988a513ea2fed091/spreadsheet_manager-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "44a29989bd9a19f001f19ffc46309c5b4c16ab721bf4b6af77f269e5670449f4",
"md5": "77aad638169983518d29dc7455e1565e",
"sha256": "8943538679ea3ab9a940325aa74fdfa13ec0e0de29e43b5ed87f8355a53a81ed"
},
"downloads": -1,
"filename": "spreadsheet_manager-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "77aad638169983518d29dc7455e1565e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3999,
"upload_time": "2024-12-31T08:46:32",
"upload_time_iso_8601": "2024-12-31T08:46:32.367157Z",
"url": "https://files.pythonhosted.org/packages/44/a2/9989bd9a19f001f19ffc46309c5b4c16ab721bf4b6af77f269e5670449f4/spreadsheet_manager-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-31 08:46:32",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "spreadsheet-manager"
}