Skip to main content

A reusable scheduling capability module

Project description

Schedule Module

A reusable, production-grade scheduling capability module designed for both human developers and AI agents. It provides a robust scheduling system that allows projects to create, manage, and query events, routines, and time-based records across systems using a strictly structured PostgreSQL database.

Architecture & Principles

  • Installability: Can be initialized easily via make initial.
  • Backward Compatibility: Migrations are versioned and immutable.
  • Agent-First Design: Includes MCP integration and YAML action definitions for native AI consumption.
  • Human Usability: Clean API, strongly typed Pydantic models.

Usage

1. Installation

To initialize the database locally via Docker Compose, simply run:

make initial

This will:

  1. Spin up a PostgreSQL container using docker-compose.yml.
  2. Apply the initial schema and tables (/db/ddl).
  3. Run all pending migrations (/db/migrations).

2. Python API

Use the Schedule service to interact with your data:

from datetime import datetime, timezone
import asyncio
from uuid import uuid4
from src import Schedule, ScheduledRoutineCreate, RecurrencyType

async def main():
    async with Schedule() as schedule_service:
        routine = ScheduledRoutineCreate(
            name="Daily Standup",
            start_date_time=datetime.now(timezone.utc),
            end_date_time=datetime.now(timezone.utc),
            recurrency=RecurrencyType.daily
        )
        created_routine = await schedule_service.add_schedule(routine)
        print("Created Routine ID:", created_routine.id)

if __name__ == "__main__":
    asyncio.run(main())

3. Agent Integration

Refer to agent/mcp.yaml and agent/actions.yaml for using this module as a tool in AI workflows via MCP (Model Context Protocol).

Infrastructure

We include boilerplate configurations for deployments:

  • infra/docker-compose.yml: For local deployments
  • infra/terraform: Example Terraform modules for AWS RDS Postgres deployments

Publishing

The module includes a .github/workflows/publish.yml that automatically publishes to npm and PyPI whenever changes are merged into the main branch.

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

schedule_module-0.1.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

schedule_module-0.1.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file schedule_module-0.1.2.tar.gz.

File metadata

  • Download URL: schedule_module-0.1.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for schedule_module-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ffe03da9edbf8b673d3a775051ba22700fec875d922df87aef68ea2c0ab2cd36
MD5 2e23e1a663d964c0190b1c7592f46116
BLAKE2b-256 897025080a7d392ca1b23e946d091b3bfb74283c2a18d3bde588dba6e56b3f06

See more details on using hashes here.

File details

Details for the file schedule_module-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for schedule_module-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 363ea3a1df162772ed93bafdfb232cbb56cba074cfa256d33a71d62b88af9e13
MD5 a850533ebebbcbf57fd9300c2755466b
BLAKE2b-256 004c91f9673aff70f5b5190bec0f99774246986ae16c2a1c30c91f9f5be71cc2

See more details on using hashes here.

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