{"id":25661115,"url":"https://github.com/nexium-dev/nexium_google","last_synced_at":"2026-02-22T09:40:49.479Z","repository":{"id":267399315,"uuid":"899299169","full_name":"nexium-dev/nexium_google","owner":"nexium-dev","description":"This module provides functionality for interacting with various Google services","archived":false,"fork":false,"pushed_at":"2025-03-13T15:03:26.000Z","size":280,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-18T14:49:11.366Z","etag":null,"topics":["google-sheets","google-youtube"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/nexium-google","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nexium-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-06T01:43:03.000Z","updated_at":"2025-03-13T15:03:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"62abf624-339b-40ba-bc3e-1302abd34db7","html_url":"https://github.com/nexium-dev/nexium_google","commit_stats":null,"previous_names":["nexium-dev/nexium_google"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nexium-dev/nexium_google","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexium-dev%2Fnexium_google","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexium-dev%2Fnexium_google/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexium-dev%2Fnexium_google/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexium-dev%2Fnexium_google/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexium-dev","download_url":"https://codeload.github.com/nexium-dev/nexium_google/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexium-dev%2Fnexium_google/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29708363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T05:59:28.568Z","status":"ssl_error","status_checked_at":"2026-02-22T05:58:46.208Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-sheets","google-youtube"],"created_at":"2025-02-24T02:28:01.111Z","updated_at":"2026-02-22T09:40:49.474Z","avatar_url":"https://github.com/nexium-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧡 Nexium Google\n\nWelcome to the documentation for the `nexium_google` module. This module provides functionality for interacting with various Google services, including `Spreadsheet` and `YouTube`.\n\n## Table of Contents:\n\n1. [Introduction](#introduction)\n2. [Installation](#installation)\n3. [Spreadsheet](#spreadsheet)\n   - [Setting up a Spreadsheet instance](#setting-up-a-spreadsheet-instance)\n   - [Configuring a Row model](#configuring-a-row-model)\n   - [Usage example](#usage-example)\n4. [YouTube](#youtube)\n   - [In Development](#in-development)\n5. [Conclusion](#conclusion)\n6. [License](#license)\n\n## Introduction\n\nThe `nexium_google` module is a powerful tool for interacting with various services using Python. This module is asynchronous and leverages the Google API to provide an abstract interface for performing operations with Google services.\n\n## Installation\n\nTo install the `nexium_google` module, you can use pip.\n```sh\npip install nexium_google\n```\n\n## Spreadsheet\n### Setting up a Spreadsheet instance\n\nAt this point, make sure you have your Google Cloud Service account credentials and the necessary permissions to access Google Sheets. You will need a JSON file with your credentials as well as the Google Sheet ID.\n\nNow, we need to initialize a `Spreadsheet` instance using your service account and sheet ID.\n\n```python\nfrom nexium_google.utils import ServiceAccount\nfrom nexium_google.spreadsheet import Spreadsheet\n\ngoogle_sheet = Spreadsheet(\n   service_account=ServiceAccount(filename='creds.json'),\n   id_='your-spreadsheet-id',\n   models=[],\n)\n```\n\n### Configuring a Row model\n\nThe `BaseRowModel` functionality allows you to define models for the structure of your Google Sheet, similar to how ORM platforms work with databases. This includes defining columns and their types in Python, such as:\n- String\n- Integer\n- Float\n- DateTime\n- Boolean\n\nAt this stage, ensure that the corresponding sheet in Google Sheets is already created. Additionally, the `title` in the `Field` must match the column name exactly.\n\n```python\nfrom nexium_google.spreadsheet import BaseRowModel, Field, FieldType\n\nclass UserRowModel(BaseRowModel):\n    __sheet__ = 'Users'\n    id = Field(title='ID', type_=FieldType.INTEGER, nullable=False)\n    fullname = Field(title='Full Name', type_=FieldType.STRING, nullable=False)\n    salary = Field(title='Salary', type_=FieldType.FLOAT)\n    created_at = Field(title='DateTime', type_=FieldType.DATETIME, format_='%Y-%m-%d %H:%M')\n```\n\nOnce you've created all the necessary models, add them to the `models` field in the `Spreadsheet` instance you previously initialized. This will link the sheets to your table.\n\n### Usage example\n\n```python\nfrom asyncio import run, sleep\nfrom datetime import datetime\n\nfrom nexium_google.utils import ServiceAccount\nfrom nexium_google.spreadsheet import Spreadsheet\nfrom nexium_google.spreadsheet import BaseRowModel, Field, FieldType\n\n\nclass UserRowModel(BaseRowModel):\n    __sheet__ = 'Users'\n    id = Field(title='ID', type_=FieldType.INTEGER, nullable=False)\n    fullname = Field(title='Full Name', type_=FieldType.STRING, nullable=False)\n    salary = Field(title='Salary', type_=FieldType.FLOAT)\n    created_at = Field(title='DateTime', type_=FieldType.DATETIME, format_='%Y-%m-%d %H:%M')\n\n\ngoogle_sheet = Spreadsheet(\n    service_account=ServiceAccount(filename='creds.json'),\n    id_='your-spreadsheet-id',\n    models=[UserRowModel],\n)\n\n\nasync def main():\n    # Create new user\n    user = UserRowModel(\n        id=3,\n        fullname='Yegor Yakubovich',\n        salary=1000000,\n        created_at=datetime.now(),\n    )\n    await user.create()\n    await sleep(2)\n\n    # Get all users\n    for user in await UserRowModel().get_all():\n        # Print data\n        print(f'Full Name: {user.fullname}, Salary: {user.salary}')\n\n        # Update salary\n        if user.id == 3:\n            continue\n\n        user.salary = 0\n        await user.update()\n        await sleep(1)\n\n\nif __name__ == '__main__':\n    run(main())\n```\nThe example below demonstrates an algorithm where a new user is added, followed by a `for` loop iterating through all users to update their salaries.\n![Spreadsheet](https://github.com/nexium-dev/nexium_google/blob/main/docs/spreadsheet.gif?raw=true)\n\n## YouTube\n\n### In Development\n\n## Conclusion\n\nThe nexium_google module's Spreadsheet functionality provides a powerful and flexible way to manage Google Spreadsheets in Python. By defining models and leveraging asynchronous methods, you can efficiently perform CRUD operations on your spreadsheets.\n\nFeel free to explore and expand the capabilities of the module to suit your specific needs. Good luck! 🧡\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\nCopyright © 2024 Yegor Yakubovich\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexium-dev%2Fnexium_google","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexium-dev%2Fnexium_google","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexium-dev%2Fnexium_google/lists"}