An easy interface for Google Calendar
Install
pip install google_calendar_interface
This project is a work in progress. Please excuse any unprofessionalism
Example Usage
from gs_oauth_tools import AuthManager
import datetime
import time
import webbrowser
MY_ID = '4105'
authManager = AuthManager(googleJSONpath=r'C:\Users\gmiller\PycharmProjects\gs_oauth\google_test_creds.json')
user = authManager.GetUserByID(MY_ID)
if not user:
d = authManager.CreateNewUser(MY_ID, 'Google')
webbrowser.open(d.get('verification_uri'))
print('d=', d)
while not user:
user = authManager.GetUserByID(MY_ID)
time.sleep(1)
print('user=', user)
google = GoogleCalendar(
calendarName='Grants Test New Calendar',
getAccessTokenCallback=user.GetAccessToken,
debug=True,
)
google.NewCalendarItem = lambda _, event: print('NewCalendarItem', event)
google.CalendarItemChanged = lambda _, event: print('CalendarItemChanged', event)
google.CalendarItemDeleted = lambda _, event: print('CalendarItemDeleted', event)
google.UpdateCalendar()
if len(google.GetNowCalItems()) == 0:
google.CreateCalendarEvent(
subject=time.asctime(),
body='body',
startDT=datetime.datetime.now(),
endDT=datetime.datetime.now() + datetime.timedelta(minutes=5),
)
while True:
google.UpdateCalendar()
time.sleep(10)
Metadata
Release files for google-calendar-interface 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| google_calendar_interface-0.0.2.tar.gz | 4.4 kB | Without provenance | Details for google_calendar_interface-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| google_calendar_interface-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for google_calendar_interface-0.0.2-py3-none-any.whl |
Total release size: 9.1 kB
Release files / google_calendar_interface-0.0.2.tar.gz
| Download URL | google_calendar_interface-0.0.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae52bb82778129654a2001d08b1805e0155e7b07e346092c0517f3ad110e047d
|
|
BLAKE2b-256 checksum How to use checksums |
2ec525cdf0e06f4b36136655565ffda05b765244916f06de1cb3cb2ee11f75d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.2
|
Release files / google_calendar_interface-0.0.2-py3-none-any.whl
| Download URL | google_calendar_interface-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20d47248a524cba9e43d921aea4b0d2e31eca902c3b12396feacc54048f2fedb
|
|
BLAKE2b-256 checksum How to use checksums |
bbc6c99475c177b5aa69f286caabcceac9bfea349eea43cb04b0d851d959a506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.2
|
Security for google-calendar-interface 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.