Skip to main content

📅 jcalapi

jcalapi is a local calendar cache and JSON API that interacts with Exchange and Confluence calendars. It fetches events and returns them in a JSON format, making it easy to integrate calendar data into other systems.

🚀 Getting Started

📋 Prerequisites

  • Python
  • uv (or Nix with flakes)

🔑 Setting Up Credentials

To use jcalapi, you'll need to provide credentials for accessing your Exchange or Confluence calendars. These credentials should be stored in a secure location, and you should ensure that they are not exposed in your code or version control system.

For Exchange, you'll need your username and password. For Confluence, you'll need your API token.

See .envrc-sample for an example.

💾 Installation

# pip
pip install --user jcalapi

# pipx
pipx install jcalapi

🏃 Usage

You can run the application directly using Python:

python -m jcalapi

🐳 Blablabla, Docker?

docker run -it --rm -p 127.0.0.1:7042:7042 \
  -e ONFLUENCE_URL=https://confluence.example.com \
  -e CONFLUENCE_USERNAME=john.doe \
  -e CONFLUENCE_PASSWORD=XXX \
  -e EXCHANGE_USERNAME=john.doe@example.com \
  -e EXCHANGE_PASSWORD=XXX \
  -e GOOGLE_CREDENTIALS=/config/xxx.apps.googleusercontent.com.json \
  -e GOOGLE_CALENDAR_REGEX='^Work '
  ghcr.io/pschmitt/jcalapi

📚 API Usage

The API provides endpoints for fetching calendar events. Here's an example of how to use it:

curl http://localhost:7042/today

This will return a JSON response with the events data:

[
  {
    "uid": "event1",
    "backend": "exchange",
    "calendar": "calendar1",
    "organizer": "organizer1",
    "attendees": {
      "name": "hisname",
      "email": "his@email.com",
      "optional": false,
      "response": "Accept"
    },
    "summary": "event1 summary",
    "description": "event1 description",
    "body": "event1 body",
    "location": "event1 location",
    "start": "2023-06-06T00:00:00",
    "end": "2023-06-06T01:00:00",
    "whole_day": false,
    "is_recurring": false,
    "categories": [
      "Cat1",
      "Cat2"
    ],
    "status": "confirmed",
    "extra": {
      "conference_type": "Teams",
      "meeting_workspace_url": "https://teams.microsoft.com/l/meetup-join/...",
      "net_show_url": "https://teams.microsoft.com/l/meetup-join/..."
    },
    "conference_url": "https://teams.microsoft.com/l/meetup-join/..."
  },
  ...
]

To fetch events for tomorrow, you can use the /tomorrow endpoint:

curl http://localhost:7042/tomorrow

This will return a JSON response with the events data for tomorrow.

The /meta endpoint provides metadata about the backends (Confluence/Exchange):

curl http://localhost:7042/meta

The /reload endpoint allows you to reload the calendar data:

curl -X POST http://localhost:7042/reload

🤝 Contributing

Contributions are welcome! Please feel free to submit a pull request.

🧑‍💻 Development setup

  1. Clone the repository
git clone https://github.com/pschmitt/jcalapi.git
  1. Navigate into the cloned repository
cd jcalapi
  1. Setup the environment
uv sync --group dev  # with Nix devshell, dev tools are already available

Alternatives:

  • Use Nix flakes: nix develop drops you into a shell with dev tools and uv; run uv sync --group dev to install deps locally and uv run python -m jcalapi

📄 License

This project is licensed under the GNU General Public License v3.0.

Metadata

Release files for jcalapi 0.2.0

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

Source distribution (sdist)

Source distribution for jcalapi 0.2.0
File Size Uploaded
jcalapi-0.2.0.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jcalapi 0.2.0
File Interpreter ABI Platform
jcalapi-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.5 kB

Release files / jcalapi-0.2.0.tar.gz

Download URL jcalapi-0.2.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d9c0839ea41657c0db26b551c09873edc4874b894b247c65d93f86afcc46c254
BLAKE2b-256 checksum
How to use checksums
0a65ec485579d7c6f5372d96606020a9ea6220ac52b7f6ff81800979ceb60527
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 11, 2026.

Transparency log

Release files / jcalapi-0.2.0-py3-none-any.whl

Download URL jcalapi-0.2.0-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84d2a7cff4b75e799c601098f48d961ca1f0bf68832e116bf6def7d2ced1faf4
BLAKE2b-256 checksum
How to use checksums
c3902d0a73cda370d93e5c0b607dad9a5f4357779fba14664600631a1eda3fc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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