Skip to main content

About

The ICloud API for events management

Tools

  • Python 3

How to install with pip

Run this command:

pip install apple-calendar-integration

How to create event

from datetime import datetime, timedelta
from apple_calendar_integration import ICloudCalendarAPI

api = ICloudCalendarAPI(username, password)

start_date = int(datetime.now().timestamp())
end_date = start_date + timedelta(hours=2)
etag, ctag, guid = api.create_event('Your title', start_date, end_date)

This python script will create one two hour event from now. etag, ctag and guid will be used to edit or delete event.

How to delete event

from apple_calendar_integration import ICloudCalendarAPI

api = ICloudCalendarAPI(username, password)
api.delete_event(new_etag, ctag, guid)

Should return True if everything is OK.

How to edit event with repeat

How to add repeat num of times with some frequency

{
  "count": 5,
  "freq": "daily"
}

This will mean repeat every day for 5 times(days).

freq has such options:

  • daily
  • weekly
  • monthly
  • yearly

How to add repeat until date with some frequency

Also, you can specify not num of times, but with the end date parameter.

{
  "until": 1536910206,
  "freq": "monthly"
}

All code together

from apple_calendar_integration import ICloudCalendarAPI

api = ICloudCalendarAPI(username, password)
repeat = {
  "until": 1536910206,
  "freq": "monthly"
}
new_etag = api.edit_event(etag, ctag, guid, repeat=repeat)

Should return new etag if everything is OK

How to edit event with alarm

If you want to create alarm in the moment of event

{
  "before": false
}

If before the event

{
  "before": false,
  "hours": 3,
  "minutes": 2,
  "seconds": 1 
}

This will send notification about event 3 hours 2 minute and 1 second before event start date

There are such options:

  • weeks
  • days
  • hours
  • minutes
  • seconds

All code together

from apple_calendar_integration import ICloudCalendarAPI

api = ICloudCalendarAPI(username, password)
alarm = {
  "before": False,
  "hours": 3,
  "minutes": 2,
  "seconds": 1 
}
new_etag = api.edit_event(etag, ctag, guid, alarm=alarm)

Should return new etag if everything is OK

How to edit event with invites

How to add new people to event

from apple_calendar_integration import ICloudCalendarAPI

api = ICloudCalendarAPI(username, password)
invites = ["email_1@gmail.com", "email_2@gmail.com"]
new_etag = api.edit_event(etag, ctag, guid, add_invites=invites)

How to remove someone from invites

from apple_calendar_integration import ICloudCalendarAPI

api = ICloudCalendarAPI(username, password)
invites = ["email_1@gmail.com"]
new_etag = api.edit_event(new_etag, ctag, guid, remove_invites=invites)

Should return new etag if everything is OK

How to edit note, url, title or event date

from apple_calendar_integration import ICloudCalendarAPI
import time

api = ICloudCalendarAPI(username, password)

new_etag = api.edit_event(etag, ctag, guid,
                          note='New notw', url='https://my_url.com', title='New title',
                          start_date_timestamp=int(time.time()), end_date_timestamp=int(time.time()) + 1000)

Should return new etag if everything is OK

Metadata

Release files for apple-calendar-integration 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apple-calendar-integration 0.0.1
File Size Uploaded Provenance
apple-calendar-integration-0.0.1.tar.gz 5.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for apple-calendar-integration 0.0.1
File Interpreter ABI Platform
apple_calendar_integration-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / apple-calendar-integration-0.0.1.tar.gz

Download URL apple-calendar-integration-0.0.1.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
95680e5c19a85e360f7322919211e6013665d660f30b12b8b95998541546bccd
BLAKE2b-256 checksum
How to use checksums
428aef45bcb7260c0d02295ae28ca6e76755cae84ac0ca04737125775e7d6d19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Release files / apple_calendar_integration-0.0.1-py3-none-any.whl

Download URL apple_calendar_integration-0.0.1-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29c0047d41428b2b55566c62a2669f7df6cb6f340379388afa9364fe89384d4a
BLAKE2b-256 checksum
How to use checksums
80e653062bc84b733f8de84a9f6e74e47dc0e5170d3eb0e4014fb86b2d79f896
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Security for apple-calendar-integration 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page