Simple API for Google Calendar management with slots extension (dates and times available for scheduling)
Project description
Google Calendar Simple API Slots or gcsa-slots is an extension for Google Calendar Simple API library with slots (dates and times available for scheduling).
Installation
pip install gcsa-slots
See Getting started page for more details and installation options.
Example usage
List slots from free ranges (dates and times without events, available for scheduling)
from gcsa_slots.google_calendar import GoogleCalendar
calendar = GoogleCalendar("your_email@gmail.com")
for slot in calendar.get_slots():
print(slot)
List slots from slot-event ranges (an event that determines availability for scheduling)
from gcsa_slots.google_calendar import GoogleCalendar
calendar = GoogleCalendar("your_email@gmail.com")
for slot in calendar.get_slots(slot_summary="Free"):
print(slot)
List slots specifying time range, slot interval, max events per slot and calendar ID
from gcsa_slots.google_calendar import GoogleCalendar
calendar = GoogleCalendar("your_email@gmail.com")
calendar_id = "your calendar id"
for slot in calendar.get_slots(
slot_summary="fReE",
case_sensitive=False,
time_min=datetime(2023, 3, 6),
time_max=datetime(2023, 3, 7),
slot_duration=90,
events_per_slot=3,
calendar_id=calendar_id,
):
print(slot)
Create event in first available slot
from gcsa_slots.google_calendar import GoogleCalendar
calendar = GoogleCalendar("your_email@gmail.com")
slots = calendar.get_slots()
slot = next(slots)
slot.summary = "This is a test!"
calendar.add_event(slot)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gcsa-slots-0.1.0.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for gcsa_slots-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa467776d30036072785f2444680d579a1ce2c17eafb86c0d9ef4279518c3aa1 |
|
MD5 | f8c7e9dc4c9df11ec79ff73c3d4ba706 |
|
BLAKE2b-256 | 613ae9903688ff3cdb024c72758fb7e561a9eed6899b01900fe36dcf2698fc69 |