Source: factory.core/ObjCalendar.py
Calendar event entity for storing and persisting events.
Holds event metadata (title, start, end, location,
description) and saves records to the data_events table.
| Method | Signature | Description |
|---|---|---|
| random | random() -> None |
Populate fields with random fake data. |
| save | save() -> None |
Persist the current event to the data_events table. |
Calendar service for querying and managing event schedules.
Provides event retrieval, time updates, constraint
computation for day-of-week validation, iCal file import,
and JSON serialisation of event lists.
| Method | Signature | Description |
|---|---|---|
| update_event_time | update_event_time(id: str, start: str = '', end: str = '') -> None |
Update start and end times for an event by GUID. |
| get_event_list | get_event_list(user: str = '', event_class: str = '', start: str = '', end: str = '') -> list |
Retrieve a list of calendar events as dictionaries. |
| compute_constraint | compute_constraint(items: list[dict[str, Any]]) -> list[dict[str, Any]] |
Apply day-of-week and date-range constraints. |
| get_event_json | get_event_json() -> str |
Return all events as a JSON string. |
| clean_events | clean_events() |
Delete all rows from data_events. |
| read_ical_file | read_ical_file(input_file: str = '') -> None |
Import events from an iCal (.ics) file. |
Run calendar test: fetch and compute events.