Metadata-Version: 2.4
Name: slotify-engine
Version: 0.1.0
Summary: Headless scheduling and time-slot engine for Python applications.
Project-URL: Homepage, https://github.com/QuillishMorrison/Slotify
Project-URL: Documentation, https://github.com/QuillishMorrison/Slotify/tree/main/docs
Project-URL: Repository, https://github.com/QuillishMorrison/Slotify
Project-URL: Issues, https://github.com/QuillishMorrison/Slotify/issues
Author: Slotify contributors
License-Expression: MIT
License-File: LICENSE
Keywords: booking,calendar,schedule,scheduler,slots,time-range
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Scheduling
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: twine>=5.1; extra == 'dev'
Description-Content-Type: text/markdown

﻿# slotify

Русская версия: [README.md](README.md).

`slotify` is a production-oriented, headless Python scheduling engine for time ranges, slots, bookings, blocks, and scheduling rules.

## Positioning

This package is intended for developers embedding scheduling behavior into:

- web backends
- APIs and microservices
- internal tools
- CLI workflows
- reusable open-source libraries

It is framework-agnostic and storage-agnostic by design.

## Features

- timezone-aware API with UTC-normalized calculations
- source-of-truth event model plus derived slots
- pluggable rules and strategies
- optimistic concurrency hooks
- strong typing and modern Python packaging
- in-memory implementation for tests and prototyping
- merge/split free-slot behavior out of the box

## Example

```python
from datetime import UTC, datetime, timedelta

from slotify import InMemoryScheduleRepository, Scheduler
from slotify.domain import ScheduleDefinition, TimeRange

repository = InMemoryScheduleRepository()
scheduler = Scheduler(repository=repository)

repository.create_schedule(
    ScheduleDefinition(
        schedule_id="room-a",
        bounds=TimeRange(
            start=datetime(2026, 3, 23, 8, 0, tzinfo=UTC),
            end=datetime(2026, 3, 23, 18, 0, tzinfo=UTC),
        ),
        slot_size=timedelta(minutes=30),
        timezone="UTC",
    )
)

scheduler.add_block(
    "room-a",
    start=datetime(2026, 3, 23, 12, 0, tzinfo=UTC),
    end=datetime(2026, 3, 23, 13, 0, tzinfo=UTC),
    metadata={"reason": "maintenance"},
)

available_slots = scheduler.get_slots("room-a")
```

## Installation

```bash
python -m pip install slotify
```

For local development:

```bash
python -m pip install -e .[dev]
```

## Docs

See the `docs/` directory for:

- overview
- quickstart
- concepts
- extensibility notes
- roadmap

## Status

Version `0.1.0` is focused on a clean, reusable core for scheduling logic. It does not implement distributed locking or full RRULE recurrence yet.
