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.0.tar.gz (6.4 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.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: schedule_module-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 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.0.tar.gz
Algorithm Hash digest
SHA256 46e07896f9be7fb518e0c9c884c998a2c4410295ac3f8a2d3239ee360f16e673
MD5 86e4b24fa267f5e5b1d5becbc1c9bddd
BLAKE2b-256 3eb2a3b0b92655b501fff3cba7404ec8bcbbedc83208ca2d0ca3e44864983955

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for schedule_module-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7456c2376094d65fab7569fd64808bc53a57c0b8dc74a225be250705f9acb81
MD5 3753be8d4f6279bf3d4fc7752a95b02f
BLAKE2b-256 83613c9c3e0a8a749a59c28f6acd84df7f162af6ba78cef6f18037efa9967b1e

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