Skip to main content

Thin wrapper around icalBuddy and AppleScript for macOS Calendar access.

Project description

pycalbuddy

Small macOS-only wrapper around icalBuddy (read/list) and AppleScript via osascript (write/update) for Calendar events.

Installation

uv sync

Runtime dependencies are only the macOS binaries:

  • icalBuddy (install with Homebrew: brew install ical-buddy)
  • osascript (bundled with macOS)

Grant Calendar permissions to the calling terminal/app in System Settings → Privacy & Security → Automation/Calendars if commands are denied.

CLI usage

uv run pycalbuddy daily --json
uv run pycalbuddy weekly --start 2024-01-01 --days 10
uv run pycalbuddy add --calendar Work --title "Demo" --start 2024-02-01T10:00:00 --end 2024-02-01T11:00:00
uv run pycalbuddy add --calendar Work --title "Offsite" --start 2024-02-03T00:00:00 --end 2024-02-04T00:00:00 --all-day
uv run pycalbuddy update --uid ABC123 --title "Updated title"
uv run pycalbuddy update --uid ABC123 --move-to Archive

Use --json on listing commands for machine-readable output. Add --calendar NAME multiple times to filter specific calendars. --no-all-day excludes all-day entries. Set PYCALBUDDY_DEBUG=1 to print the underlying icalBuddy commands and raw output for troubleshooting.

Library usage

import datetime as dt
from pycalbuddy import list_daily_events, add_event, update_event

events = list_daily_events()

uid = add_event(
    calendar="Work",
    title="Planning",
    start=dt.datetime(2024, 2, 1, 9, 0),
    end=dt.datetime(2024, 2, 1, 10, 0),
)

update_event(uid=uid, notes="Bring slides", target_calendar="Archive")

Testing

All external commands are mocked; no real Calendar access is needed.

uv run pytest
uv run pytest --cov=pycalbuddy --cov-report=term-missing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycalbuddy-0.1.0.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycalbuddy-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file pycalbuddy-0.1.0.tar.gz.

File metadata

  • Download URL: pycalbuddy-0.1.0.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pycalbuddy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dce595eb0074678f60038e082324fb6e1f7ee9648a8a2a47f182b1cc726edb37
MD5 bf9e792aaf2f9515a25124083203f57e
BLAKE2b-256 38aa69fa7865913423b2b79d44ebcded1d92526bb4cbf4a0ed754c7b67341e23

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycalbuddy-0.1.0.tar.gz:

Publisher: publish.yml on aia/pycalbuddy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycalbuddy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycalbuddy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pycalbuddy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df10aa2ca22838b71097724c79db30cf5c3fd8bb56bc250ea7b61e38fe6216b5
MD5 076cc1a47cf09b9c6e47ff76876dcc39
BLAKE2b-256 dc0e969e04f3dc601cfc1df1366cd0eccfa021bfaeecc41e08c6f3ef32014cdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycalbuddy-0.1.0-py3-none-any.whl:

Publisher: publish.yml on aia/pycalbuddy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page