Name | gapps JSON |
Version |
0.1.1
JSON |
| download |
home_page | |
Summary | python interface of the google apps service |
upload_time | 2024-01-09 02:39:47 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | MIT License Copyright (c) 2022 Serge Koudoro Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
appscript
cardservice
google workspace add-ons
docs
sheet
calendar
gmail
forms
slide
drive
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<img height="100px" src="https://github.com/skoudoro/gapps/blob/main/docs/source/_static/images/gapps_logo_144.png?raw=true">
</p>
<h5 align="center"> <b>Build Google Workspace add-ons in Python 🐍 !!!</b></h5>
<p align="center">
***
</p>
<div align="center">
[![Build Status](https://github.com/skoudoro/gapps/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/skoudoro/gapps/actions?query=workflow%3ATest) [![Deployment](https://img.shields.io/pypi/v/gapps.svg?logo=python&logoColor=white)](https://pypi.org/project/gapps/) [![Code Quality](https://api.codacy.com/project/badge/Grade/9c17e95d29cd489ba86411db969a576e)](https://app.codacy.com/manual/skab12/gapps?utm_source=github.com&utm_medium=referral&utm_content=skoudoro/gapps&utm_campaign=Badge_Grade_Dashboard) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Contribution](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/skoudoro/gapps/blob/master/CONTRIBUTING.rst) [![PR](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/skoudoro/gapps/compare)
</div>
<!-- <a href="https://codecov.io/gh/skoudoro/gapps"><img src="https://codecov.io/gh/skoudoro/gapps/branch/master/graph/badge.svg" alt="codecov gapps python"></a> -->
<!-- <a href="https://github.com/skoudoro/gapps/graphs/contributors"><img src="https://img.shields.io/github/contributors/skoudoro/gapps.svg"></a> -->
---
## 📝 Table of Contents
<div style="background-color: #EBE8FC">
- [❗ What is GAPPS?](#what-is-gapps)
- [⚡ Key Features](#key-features)
- [🏁 Getting Started](#getting-started)
- [🚜 Installation](#installation)
- [⚙️ CardService: Choose your coding style!](cardservice-choose-your-coding-style)
- [⛏️ Card Builder](#card-builder)
- [🚀 Demos](#demos)
- [💬 Tutorials](#tutorials)
- [📄 Methods Reference](#methods-reference)
- [⚠️ Notes](#notes)
- [✅ Tests](#tests)
- [✨ Contribute](#contribute)
- [🎓 License](#license)
</div>
## ❗ What is GAPPS?
**GAPPS** is a library that allows developers to easily and flexibly build [add-ons for Google Workspace](https://developers.google.com/workspace/add-ons/how-tos/building-gsuite-addons) using Python 🐍. With **GAPPS**, you can create powerful tools and integrations for Gmail, Google Chat, Calendar, Sheets, Drive, Docs and other Google Workspace apps, that can streamline your workflow and automate common tasks.
## ⚡ Key Features
- A simple and easy-to-use API for building Google Workspace add-ons.
- Flexible interface that can be used for a variety of use cases.
- Built-in support for Gmail, Google Calendar, Google Drive and other Google Workspace apps.
- Well-documented, well-maintained codebase and easy to contribute.
## 🏁 Getting Started
### 🚜 Installation
This client is hosted at [PyPi](https://pypi.org/project/gapps/) under the name **gapps**, to install it, simply run
```terminal
pip install gapps
```
or install dev version:
```terminal
git clone https://github.com/skoudoro/gapps.git
pip install -e .
````
### ⚙️ CardService: Choose your coding style!
GAPPS allows you to build extensions by following your favorite coding style
<!--
![](https://developers.google.com/apps-script/add-ons/images/workspace-addons-cats.png) -->
#### Appscript Style
```python
from gapps import CardService
def create_cat_card(text):
# Use the "Cat as a service" API to get the cat image. Add a "time" URL
# parameter to act as a cache buster.
now = datetime.now()
caption = text.replace('/', ' ')
imageUrl = f'https://cataas.com/cat/says/{caption}?time={now.timestamp()}'
image = CardService.newImage() \
.setImageUrl(imageUrl) \
.setAltText('Meow')
# Create a button that changes the cat image when pressed.
# Note: Action parameter keys and values must be strings.
action = CardService.newAction() \
.setFunctionName('on_change_cat') \
.setParameters({'text': text, 'is_homepage': str(is_homepage)})
button = CardService.newTextButton() \
.setText('Change cat') \
.setOnClickAction(action) \
.setTextButtonStyle(CardService.TextButtonStyle.FILLED)
buttonSet = CardService.newButtonSet() \
.addButton(button)
# Assemble the widgets and return the card.
section = CardService.newCardSection() \
.addWidget(image) \
.addWidget(buttonSet)
card = CardService.newCardBuilder() \
.addSection(section)
return card.build()
```
#### Pythonic Style
```python
from gapps import CardService
def create_cat_card(text):
# Use the "Cat as a service" API to get the cat image. Add a "time" URL
# parameter to act as a cache buster.
now = datetime.now()
caption = text.replace('/', ' ')
imageUrl = f'https://cataas.com/cat/says/{caption}?time={now.timestamp()}'
image = CardService.Image(image_url=imageUrl, alt_text='Meow')
action = CardService.Action(
function_name='on_change_cat',
parameters={'text': text, 'is_homepage': str(is_homepage)})
button = CardService.TextButton(
text='Change cat', action=action,
text_button_style=CardService.TextButtonStyle.FILLED)
button_set = CardService.ButtonSet(button=button)
section = CardService.CardSection(widget=[image, button_set])
card = CardService.CardBuilder(section=section)
return card.build()
```
#### ⛏️ Card Builder
The online [Card builder](https://gw-card-builder.web.app/) can help you prototype your app's interface.
## 🚀 Demos
Check out the [examples folder](https://github.com/skoudoro/gapps/tree/main/docs/examples) for sample codes. It contains the following examples:
- [cats.py](https://github.com/skoudoro/gapps/blob/main/docs/examples/cats.py): Mirror of google Cats example. Compatible with Gmail, Google Calendar, Google Drive, Google Docs and Google sheets
- [simple_demo.py](https://github.com/skoudoro/gapps/blob/main/docs/examples/simple_demo.py): minimalistic example to show how to build a basic card.
- [card_builder.py](https://github.com/skoudoro/gapps/blob/main/docs/examples/card_builder_templates.py): This example show how to reproduce all the templates from the online [Card builder](https://gw-card-builder.web.app/). It can help you prototype your app's interface.
## 💬 Tutorials
Coming soon...
## 📄 Methods reference
**CardService:** For the complete reference, visit the [official Google Workspace Add Ons API reference](https://developers.google.com/apps-script/reference/card-service).
## ⚠️ Notes
We still need to handle some widgets/builders but 90% of them are working correctly
## ✅ Tests
* Step 1: Install pytest
```terminal
pip install pytest
```
* Step 2: Run the tests
```terminal
pytest -svv gapps
```
## ✨ Contribute
We love contributions!
You've discovered a bug or something else you want to change - excellent! [Create an issue](https://github.com/skoudoro/gapps/issues)!
You've worked out a way to fix it – even better! Submit a [Pull Request](https://github.com/skoudoro/gapps/pulls)!
Start with the [contributing guide](https://github.com/skoudoro/gapps/blob/master/CONTRIBUTING.rst)!
## Do you like GAPPS?
Show us with a star on github...
![Star GAPPS](docs/source/_static/images/star.gif)
## 🎓 License
Project under MIT license, more information [here](https://github.com/skoudoro/gapps/blob/master/LICENSE)
Raw data
{
"_id": null,
"home_page": "",
"name": "gapps",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "appscript,cardservice,google workspace add-ons,docs,sheet,calendar,gmail,forms,slide,drive",
"author": "",
"author_email": "Serge Koudoro <skab12@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e8/51/3ef97fc5d77709eff75fe44535211bdc4005a694fba07705495c38f111af/gapps-0.1.1.tar.gz",
"platform": null,
"description": "\n<p align=\"center\">\n<img height=\"100px\" src=\"https://github.com/skoudoro/gapps/blob/main/docs/source/_static/images/gapps_logo_144.png?raw=true\">\n</p>\n\n<h5 align=\"center\"> <b>Build Google Workspace add-ons in Python \ud83d\udc0d !!!</b></h5>\n\n<p align=\"center\">\n***\n</p>\n\n<div align=\"center\">\n\n[![Build Status](https://github.com/skoudoro/gapps/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/skoudoro/gapps/actions?query=workflow%3ATest) [![Deployment](https://img.shields.io/pypi/v/gapps.svg?logo=python&logoColor=white)](https://pypi.org/project/gapps/) [![Code Quality](https://api.codacy.com/project/badge/Grade/9c17e95d29cd489ba86411db969a576e)](https://app.codacy.com/manual/skab12/gapps?utm_source=github.com&utm_medium=referral&utm_content=skoudoro/gapps&utm_campaign=Badge_Grade_Dashboard) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Contribution](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/skoudoro/gapps/blob/master/CONTRIBUTING.rst) [![PR](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/skoudoro/gapps/compare)\n\n</div>\n\n<!-- <a href=\"https://codecov.io/gh/skoudoro/gapps\"><img src=\"https://codecov.io/gh/skoudoro/gapps/branch/master/graph/badge.svg\" alt=\"codecov gapps python\"></a> -->\n<!-- <a href=\"https://github.com/skoudoro/gapps/graphs/contributors\"><img src=\"https://img.shields.io/github/contributors/skoudoro/gapps.svg\"></a> -->\n\n---\n\n## \ud83d\udcdd Table of Contents\n<div style=\"background-color: #EBE8FC\">\n\n- [\u2757 What is GAPPS?](#what-is-gapps)\n- [\u26a1 Key Features](#key-features)\n- [\ud83c\udfc1 Getting Started](#getting-started)\n - [\ud83d\ude9c Installation](#installation)\n - [\u2699\ufe0f CardService: Choose your coding style!](cardservice-choose-your-coding-style)\n - [\u26cf\ufe0f Card Builder](#card-builder)\n- [\ud83d\ude80 Demos](#demos)\n- [\ud83d\udcac Tutorials](#tutorials)\n- [\ud83d\udcc4 Methods Reference](#methods-reference)\n- [\u26a0\ufe0f Notes](#notes)\n- [\u2705 Tests](#tests)\n- [\u2728 Contribute](#contribute)\n- [\ud83c\udf93 License](#license)\n\n</div>\n\n\n## \u2757 What is GAPPS?\n\n**GAPPS** is a library that allows developers to easily and flexibly build [add-ons for Google Workspace](https://developers.google.com/workspace/add-ons/how-tos/building-gsuite-addons) using Python \ud83d\udc0d. With **GAPPS**, you can create powerful tools and integrations for Gmail, Google Chat, Calendar, Sheets, Drive, Docs and other Google Workspace apps, that can streamline your workflow and automate common tasks.\n\n\n## \u26a1 Key Features\n\n- A simple and easy-to-use API for building Google Workspace add-ons.\n- Flexible interface that can be used for a variety of use cases.\n- Built-in support for Gmail, Google Calendar, Google Drive and other Google Workspace apps.\n- Well-documented, well-maintained codebase and easy to contribute.\n\n## \ud83c\udfc1 Getting Started\n\n### \ud83d\ude9c Installation\n\nThis client is hosted at [PyPi](https://pypi.org/project/gapps/) under the name **gapps**, to install it, simply run\n\n```terminal\npip install gapps\n```\n\nor install dev version:\n\n```terminal\ngit clone https://github.com/skoudoro/gapps.git\npip install -e .\n````\n\n### \u2699\ufe0f CardService: Choose your coding style!\n\nGAPPS allows you to build extensions by following your favorite coding style\n\n<!--\n![](https://developers.google.com/apps-script/add-ons/images/workspace-addons-cats.png) -->\n#### Appscript Style\n\n```python\nfrom gapps import CardService\n\ndef create_cat_card(text):\n # Use the \"Cat as a service\" API to get the cat image. Add a \"time\" URL\n # parameter to act as a cache buster.\n now = datetime.now()\n caption = text.replace('/', ' ')\n imageUrl = f'https://cataas.com/cat/says/{caption}?time={now.timestamp()}'\n\n image = CardService.newImage() \\\n .setImageUrl(imageUrl) \\\n .setAltText('Meow')\n\n # Create a button that changes the cat image when pressed.\n # Note: Action parameter keys and values must be strings.\n action = CardService.newAction() \\\n .setFunctionName('on_change_cat') \\\n .setParameters({'text': text, 'is_homepage': str(is_homepage)})\n\n button = CardService.newTextButton() \\\n .setText('Change cat') \\\n .setOnClickAction(action) \\\n .setTextButtonStyle(CardService.TextButtonStyle.FILLED)\n\n buttonSet = CardService.newButtonSet() \\\n .addButton(button)\n\n # Assemble the widgets and return the card.\n section = CardService.newCardSection() \\\n .addWidget(image) \\\n .addWidget(buttonSet)\n\n card = CardService.newCardBuilder() \\\n .addSection(section)\n\n return card.build()\n\n```\n\n#### Pythonic Style\n\n```python\nfrom gapps import CardService\n\ndef create_cat_card(text):\n # Use the \"Cat as a service\" API to get the cat image. Add a \"time\" URL\n # parameter to act as a cache buster.\n now = datetime.now()\n caption = text.replace('/', ' ')\n imageUrl = f'https://cataas.com/cat/says/{caption}?time={now.timestamp()}'\n\n image = CardService.Image(image_url=imageUrl, alt_text='Meow')\n action = CardService.Action(\n function_name='on_change_cat',\n parameters={'text': text, 'is_homepage': str(is_homepage)})\n button = CardService.TextButton(\n text='Change cat', action=action,\n text_button_style=CardService.TextButtonStyle.FILLED)\n button_set = CardService.ButtonSet(button=button)\n section = CardService.CardSection(widget=[image, button_set])\n\n card = CardService.CardBuilder(section=section)\n\n return card.build()\n```\n\n#### \u26cf\ufe0f Card Builder\n\nThe online [Card builder](https://gw-card-builder.web.app/) can help you prototype your app's interface.\n## \ud83d\ude80 Demos\n\nCheck out the [examples folder](https://github.com/skoudoro/gapps/tree/main/docs/examples) for sample codes. It contains the following examples:\n\n- [cats.py](https://github.com/skoudoro/gapps/blob/main/docs/examples/cats.py): Mirror of google Cats example. Compatible with Gmail, Google Calendar, Google Drive, Google Docs and Google sheets\n- [simple_demo.py](https://github.com/skoudoro/gapps/blob/main/docs/examples/simple_demo.py): minimalistic example to show how to build a basic card.\n- [card_builder.py](https://github.com/skoudoro/gapps/blob/main/docs/examples/card_builder_templates.py): This example show how to reproduce all the templates from the online [Card builder](https://gw-card-builder.web.app/). It can help you prototype your app's interface.\n\n## \ud83d\udcac Tutorials\n\nComing soon...\n## \ud83d\udcc4 Methods reference\n\n**CardService:** For the complete reference, visit the [official Google Workspace Add Ons API reference](https://developers.google.com/apps-script/reference/card-service).\n\n## \u26a0\ufe0f Notes\n\nWe still need to handle some widgets/builders but 90% of them are working correctly\n\n\n## \u2705 Tests\n\n* Step 1: Install pytest\n\n```terminal\n pip install pytest\n```\n\n* Step 2: Run the tests\n\n```terminal\n pytest -svv gapps\n```\n\n## \u2728 Contribute\n\nWe love contributions!\n\nYou've discovered a bug or something else you want to change - excellent! [Create an issue](https://github.com/skoudoro/gapps/issues)!\n\nYou've worked out a way to fix it \u2013 even better! Submit a [Pull Request](https://github.com/skoudoro/gapps/pulls)!\n\nStart with the [contributing guide](https://github.com/skoudoro/gapps/blob/master/CONTRIBUTING.rst)!\n\n## Do you like GAPPS?\n\nShow us with a star on github...\n\n![Star GAPPS](docs/source/_static/images/star.gif)\n\n## \ud83c\udf93 License\n\nProject under MIT license, more information [here](https://github.com/skoudoro/gapps/blob/master/LICENSE)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2022 Serge Koudoro Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "python interface of the google apps service",
"version": "0.1.1",
"project_urls": {
"Documentation": "https://github.com/skoudoro/gapps/tree/main#readme",
"Source": "https://github.com/skoudoro/gapps",
"Tracker": "https://github.com/skoudoro/gapps/issues"
},
"split_keywords": [
"appscript",
"cardservice",
"google workspace add-ons",
"docs",
"sheet",
"calendar",
"gmail",
"forms",
"slide",
"drive"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6ffe82d6d66bbb03a274f8a3fc7499438e6ae33986c74b9d4f8c0975cfa69315",
"md5": "3ff91652e98502bd46f94cb8869f8a32",
"sha256": "8bdb672c85a2f1532fd4dfeedd7f825db15cf7a19c2361f417003463a840e1fc"
},
"downloads": -1,
"filename": "gapps-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3ff91652e98502bd46f94cb8869f8a32",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 19863,
"upload_time": "2024-01-09T02:39:45",
"upload_time_iso_8601": "2024-01-09T02:39:45.250629Z",
"url": "https://files.pythonhosted.org/packages/6f/fe/82d6d66bbb03a274f8a3fc7499438e6ae33986c74b9d4f8c0975cfa69315/gapps-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e8513ef97fc5d77709eff75fe44535211bdc4005a694fba07705495c38f111af",
"md5": "dcacc0a192bb998aec1c3a23a4f94784",
"sha256": "2565a120898f539d5ffe72e481d4736141c77397af02d9221532b439602289cb"
},
"downloads": -1,
"filename": "gapps-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "dcacc0a192bb998aec1c3a23a4f94784",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 274426,
"upload_time": "2024-01-09T02:39:47",
"upload_time_iso_8601": "2024-01-09T02:39:47.092105Z",
"url": "https://files.pythonhosted.org/packages/e8/51/3ef97fc5d77709eff75fe44535211bdc4005a694fba07705495c38f111af/gapps-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-09 02:39:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "skoudoro",
"github_project": "gapps",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gapps"
}