Skip to main content

Slotify Scheduling

Timezone-aware scheduling and appointment slot engine for Python.

Installation

pip install slotify-scheduling

Quick start

from slotify import SlotGenerator

generator = SlotGenerator(
    start="09:00",
    end="17:00",
    duration=30,
    timezone="Asia/Kolkata",
)

slots = generator.generate("2026-09-21", "2026-09-21")

for slot in slots:
    print(slot.start, "->", slot.end)

Why Slotify?

Scheduling becomes difficult when several rules interact:

working hours + breaks + holidays + overrides
+ timezones + DST + capacity + buffers
+ booking policies + reservations

Slotify keeps those rules in a scheduling layer while your application remains responsible for users, authentication, payments, notifications, databases, and UI.

Common use cases

  • Doctor, therapist, consultant, salon, or clinic appointments
  • Meeting and interview scheduling
  • Classroom and group sessions
  • Rooms, equipment, staff, and other resource booking
  • Availability APIs in Django, FastAPI, Flask, or other Python applications

Why use Slotify?

Scheduling logic becomes complicated quickly when a system needs recurring availability, breaks, holidays, timezone conversion, daylight-saving transitions, booking limits, capacity, and conflicts.

Slotify focuses on that scheduling layer so your application can keep ownership of users, authentication, payments, notifications, and your database.

Good fit

  • Appointment and booking APIs
  • Django / Django REST Framework backends
  • Doctor, therapist, consultant, and coach availability
  • Classes, meetings, interviews, rooms, and shared resources
  • Applications that need explicit timezone and DST behavior

Not a full booking platform

Slotify is a Python library, not a hosted booking service or complete frontend. You bring your application's users, database, authentication, payments, notifications, and UI.

  • Documentation — guides, Django integration, recipes, and API reference
  • PyPI — install the package
  • Examples — runnable starting points
  • Issues — bugs and feature requests
  • Roadmap — current project direction

Features

Weekly schedules

from slotify import Schedule, SlotGenerator

schedule = Schedule(
    weekly={
        "monday": [("09:00", "17:00")],
        "tuesday": [("09:00", "17:00")],
        "wednesday": [("12:00", "20:00")],
        "thursday": [("09:00", "17:00")],
        "friday": [("09:00", "14:00")],
    }
)

generator = SlotGenerator(
    schedule=schedule,
    duration=30,
    timezone="Asia/Kolkata",
)

Date overrides and closures

schedule = Schedule(
    weekly={"monday": [("09:00", "17:00")]},
    overrides={
        "2026-09-21": [("13:00", "18:00")],
        "2026-09-28": [],
    },
    closed_dates=["2026-10-02"],
    annual_closed_dates=["12-25", "01-01"],
)

An empty override closes that date.

Breaks and split windows

generator = SlotGenerator(
    windows=[
        ("09:00", "13:00"),
        ("14:00", "18:00"),
    ],
    breaks=[("11:00", "11:30")],
    duration=30,
    timezone="Asia/Kolkata",
)

Timezones and DST

generator = SlotGenerator(
    start="01:00",
    end="03:00",
    duration=30,
    timezone="America/New_York",
    dst_ambiguous="raise",
    dst_nonexistent="skip",
)

Ambiguous policies: raise, earlier, later, both.

Nonexistent-time policies: raise, skip.

See the Timezone & DST guide.

Upcoming availability

from datetime import datetime

slots = generator.upcoming(
    7,
    now=datetime.fromisoformat("2026-09-21T08:00:00+05:30"),
)

Passing now explicitly makes tests deterministic.

Recurring bookings, rescheduling and resources

Recurring appointment series, cancellation/rescheduling rules, multi-resource bookings, and iCalendar export are available in v0.2.0.

Booking and capacity

from slotify import AvailabilityEngine, SlotGenerator

generator = SlotGenerator(
    start="09:00",
    end="17:00",
    duration=30,
    timezone="Asia/Kolkata",
)

engine = AvailabilityEngine(
    generator,
    resource_id="doctor-123",
    capacity=1,
)

available = engine.available_slots("2026-09-21")

if available:
    booking = engine.reserve(available[0])
    print(booking.booking_id)

Cancel with engine.cancel(booking.booking_id).

For group sessions, use a larger capacity.

engine = AvailabilityEngine(
    generator,
    resource_id="class-1",
    capacity=10,
)

Booking buffers

engine = AvailabilityEngine(
    generator,
    buffer_before=10,
    buffer_after=15,
)

Useful for setup, cleanup, travel, or preparation time.

Booking policies

from datetime import timedelta
from slotify import BookingPolicy

policy = BookingPolicy(
    minimum_notice=timedelta(hours=2),
    maximum_horizon=timedelta(days=30),
)

Blocked periods:

from datetime import datetime
from slotify import BlockedPeriod, BookingPolicy

policy = BookingPolicy(
    blocked_periods=(
        BlockedPeriod(
            start=datetime.fromisoformat("2026-10-10T10:00:00+05:30"),
            end=datetime.fromisoformat("2026-10-10T14:00:00+05:30"),
            reason="Provider unavailable",
        ),
    ),
)

Django

Slotify can sit behind a Django or Django REST Framework endpoint.

pip install slotify-scheduling

Example service:

from slotify import AvailabilityEngine, SlotGenerator

def get_provider_engine(provider):
    generator = SlotGenerator(
        start=provider.work_start.strftime("%H:%M"),
        end=provider.work_end.strftime("%H:%M"),
        duration=provider.slot_duration,
        timezone=provider.timezone,
    )

    return AvailabilityEngine(
        generator,
        resource_id=str(provider.pk),
        capacity=1,
    )

Example view:

from django.http import JsonResponse
from .models import Provider
from .services import get_provider_engine

def available_slots(request, provider_id):
    provider = Provider.objects.get(pk=provider_id)
    engine = get_provider_engine(provider)

    slots = engine.available_slots("2026-09-21")

    return JsonResponse({
        "provider_id": provider.pk,
        "slots": [slot.to_dict() for slot in slots],
    })

Production note: the built-in InMemoryBookingStore is for tests and simple single-process applications. Multi-worker or distributed Django deployments should provide a database-backed BookingStore and enforce the required transaction/concurrency rules in the application's database layer.

Architecture

Your Django/FastAPI/etc. application
├── users and authentication
├── providers/resources
├── database
├── payments
├── notifications
└── frontend/API
          |
          v
       Slotify
       ├── Schedule
       ├── SlotGenerator
       ├── Slot
       ├── AvailabilityEngine
       ├── BookingPolicy
       └── Booking

Documentation

Community

Requirements

  • Python 3.10+
  • No third-party runtime dependency on Linux/macOS
  • tzdata is installed automatically on Windows

Project status

Current version: 0.2.0

Slotify is currently in alpha. The API may evolve before 1.0.0, so pin the version in production applications and review the changelog when upgrading.

License

MIT License

Author

Kalash Gulati

Metadata

Release files for slotify-scheduling 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 slotify-scheduling 0.2.0
File Size Uploaded Provenance Actions
slotify_scheduling-0.2.0.tar.gz 25.4 kB With provenance Details for slotify_scheduling-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 48.7 kB

Release files / slotify_scheduling-0.2.0.tar.gz

Download URL slotify_scheduling-0.2.0.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6862e3d4f2edae41ae7cff41a4ddb8b3269aae63e407cc9c0a77c7e9da8f8f93
BLAKE2b-256 checksum
How to use checksums
5b4995316ccf2fa854ec32f8b15812843527a355973f07ce3529b80f5fc1bafc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 29, 2026.

Transparency log

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

Download URL slotify_scheduling-0.2.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c924d6ab4bbefbc10323e56b3fc22ff980c402f67f709ed3168a6f9db8ff48eb
BLAKE2b-256 checksum
How to use checksums
916c8c59579cd60eb4d5b55a3f7210be229bd9faaedab953cedbfe1a522b4d92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 29, 2026.

Transparency log

Security for slotify-scheduling 0.2.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for slotify_scheduling-0.2.0.tar.gz

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 Sep 29, 2026.

Transparency log

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.

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