https://github.com/russellane/libgoogle
Connect to Google Service API's
https://github.com/russellane/libgoogle
api client connect google google-api-python-client google-auth-httplib2 google-auth-oauthlib httplib2 oauthlib python services xdg
Last synced: 3 months ago
JSON representation
Connect to Google Service API's
- Host: GitHub
- URL: https://github.com/russellane/libgoogle
- Owner: russellane
- License: mit
- Created: 2024-12-17T22:44:35.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-13T19:50:15.000Z (4 months ago)
- Last Synced: 2025-01-13T20:39:21.122Z (4 months ago)
- Topics: api, client, connect, google, google-api-python-client, google-auth-httplib2, google-auth-oauthlib, httplib2, oauthlib, python, services, xdg
- Language: Python
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## libgoogle
Connect to Google Service API's.
The `libgoogle` package provides a function to connect to a google
service (such as Calendar, Drive and Mail), and manage credentials
and access tokens under the `XDG` schema.### function connect
Connect to Google service identified by `scope` and `version`.
Args:
scope: (valid examples):
"https://www.googleapis.com/auth/gmail"
"https://www.googleapis.com/auth/gmail.readonly"
"gmail"
"gmail.readonly"
"drive.metadata.readonly"
"photoslibrary.readonly"version: "v1", "v3", etc.
Files:
credentials: XDG_CONFIG_HOME / libgoogle / credentials.json
Must exist, or raises FileNotFoundError.token: XDG_CACHE_HOME / libgoogle / {scope}-token.json
### function set_debug
Turn on/off low-level `httplib2` debugging.
Args:
flag: True to turn on debugging, False to turn off.### function use_cache
Use cache or not.
Args:
flag: True to use cache, False to not.