openschichtplaner5-api 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openschichtplaner5_api-1.1.0/LICENSE +21 -0
- openschichtplaner5_api-1.1.0/PKG-INFO +134 -0
- openschichtplaner5_api-1.1.0/README.md +83 -0
- openschichtplaner5_api-1.1.0/openschichtplaner5_api.egg-info/PKG-INFO +134 -0
- openschichtplaner5_api-1.1.0/openschichtplaner5_api.egg-info/SOURCES.txt +168 -0
- openschichtplaner5_api-1.1.0/openschichtplaner5_api.egg-info/dependency_links.txt +1 -0
- openschichtplaner5_api-1.1.0/openschichtplaner5_api.egg-info/requires.txt +25 -0
- openschichtplaner5_api-1.1.0/openschichtplaner5_api.egg-info/top_level.txt +1 -0
- openschichtplaner5_api-1.1.0/pyproject.toml +99 -0
- openschichtplaner5_api-1.1.0/setup.cfg +4 -0
- openschichtplaner5_api-1.1.0/sp5api/__init__.py +0 -0
- openschichtplaner5_api-1.1.0/sp5api/_paths.py +23 -0
- openschichtplaner5_api-1.1.0/sp5api/cache.py +75 -0
- openschichtplaner5_api-1.1.0/sp5api/dependencies.py +480 -0
- openschichtplaner5_api-1.1.0/sp5api/main.py +1704 -0
- openschichtplaner5_api-1.1.0/sp5api/rate_limit_store.py +116 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/__init__.py +25 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/absences.py +861 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/admin.py +841 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/auth.py +729 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/availability.py +229 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/companies.py +270 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/conflict_report.py +456 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/email.py +75 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/employees.py +975 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/events.py +103 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/export_scheduler.py +528 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/ical.py +623 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/master_data.py +978 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/misc.py +1455 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/notification_settings.py +98 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/notifications.py +311 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/orm_mirror.py +479 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/overtime.py +189 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/qualification_matrix.py +139 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/recurring_shifts.py +322 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/reports.py +4306 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/schedule.py +1657 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/schedule_comments.py +99 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/schedule_pdf.py +408 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/scheduled_reports.py +840 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/webhooks.py +358 -0
- openschichtplaner5_api-1.1.0/sp5api/routers/work_time_rules.py +402 -0
- openschichtplaner5_api-1.1.0/sp5api/schemas.py +129 -0
- openschichtplaner5_api-1.1.0/sp5api/types.py +20 -0
- openschichtplaner5_api-1.1.0/tests/test_absence_stats.py +189 -0
- openschichtplaner5_api-1.1.0/tests/test_absence_status_router.py +168 -0
- openschichtplaner5_api-1.1.0/tests/test_absences_create.py +260 -0
- openschichtplaner5_api-1.1.0/tests/test_absences_helpers.py +65 -0
- openschichtplaner5_api-1.1.0/tests/test_admin_backup_helpers.py +78 -0
- openschichtplaner5_api-1.1.0/tests/test_admin_endpoints_coverage.py +64 -0
- openschichtplaner5_api-1.1.0/tests/test_api.py +670 -0
- openschichtplaner5_api-1.1.0/tests/test_api_versioning.py +125 -0
- openschichtplaner5_api-1.1.0/tests/test_auth.py +154 -0
- openschichtplaner5_api-1.1.0/tests/test_auth_2fa_coverage.py +470 -0
- openschichtplaner5_api-1.1.0/tests/test_auth_change_password.py +116 -0
- openschichtplaner5_api-1.1.0/tests/test_auth_helpers.py +42 -0
- openschichtplaner5_api-1.1.0/tests/test_auth_login_security.py +90 -0
- openschichtplaner5_api-1.1.0/tests/test_auth_reset_password_email.py +115 -0
- openschichtplaner5_api-1.1.0/tests/test_auto_migrate.py +353 -0
- openschichtplaner5_api-1.1.0/tests/test_auto_scheduling_improved.py +311 -0
- openschichtplaner5_api-1.1.0/tests/test_availability.py +246 -0
- openschichtplaner5_api-1.1.0/tests/test_bulk_group_assign.py +181 -0
- openschichtplaner5_api-1.1.0/tests/test_business_logic.py +576 -0
- openschichtplaner5_api-1.1.0/tests/test_cache.py +154 -0
- openschichtplaner5_api-1.1.0/tests/test_cache_control_prefixes.py +33 -0
- openschichtplaner5_api-1.1.0/tests/test_cache_sse_integration.py +579 -0
- openschichtplaner5_api-1.1.0/tests/test_companies_coverage.py +397 -0
- openschichtplaner5_api-1.1.0/tests/test_company.py +161 -0
- openschichtplaner5_api-1.1.0/tests/test_company_api.py +372 -0
- openschichtplaner5_api-1.1.0/tests/test_comprehensive.py +1855 -0
- openschichtplaner5_api-1.1.0/tests/test_conflict_detection.py +227 -0
- openschichtplaner5_api-1.1.0/tests/test_conflict_report.py +584 -0
- openschichtplaner5_api-1.1.0/tests/test_conflict_report_internals.py +195 -0
- openschichtplaner5_api-1.1.0/tests/test_conflicts.py +467 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_absences_misc.py +368 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_boost_admin.py +295 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_boost_employees.py +476 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_boost_misc.py +443 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_boost_misc2.py +330 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_boost_reports.py +437 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_boost_reports2.py +346 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_boost_schedule.py +312 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_boost_schedule2.py +393 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_gaps.py +820 -0
- openschichtplaner5_api-1.1.0/tests/test_coverage_routes_targeted.py +287 -0
- openschichtplaner5_api-1.1.0/tests/test_csv_import.py +389 -0
- openschichtplaner5_api-1.1.0/tests/test_data_integrity.py +189 -0
- openschichtplaner5_api-1.1.0/tests/test_dbf_field_validation.py +147 -0
- openschichtplaner5_api-1.1.0/tests/test_dbf_writer.py +399 -0
- openschichtplaner5_api-1.1.0/tests/test_dbf_writer_coverage.py +379 -0
- openschichtplaner5_api-1.1.0/tests/test_dependencies_auth.py +179 -0
- openschichtplaner5_api-1.1.0/tests/test_dev_mode.py +72 -0
- openschichtplaner5_api-1.1.0/tests/test_e2e_workflows.py +695 -0
- openschichtplaner5_api-1.1.0/tests/test_edge_cases.py +320 -0
- openschichtplaner5_api-1.1.0/tests/test_email_api.py +155 -0
- openschichtplaner5_api-1.1.0/tests/test_email_service.py +399 -0
- openschichtplaner5_api-1.1.0/tests/test_employees.py +238 -0
- openschichtplaner5_api-1.1.0/tests/test_error_paths.py +829 -0
- openschichtplaner5_api-1.1.0/tests/test_events_broadcast.py +196 -0
- openschichtplaner5_api-1.1.0/tests/test_export_scheduler.py +263 -0
- openschichtplaner5_api-1.1.0/tests/test_export_scheduler_coverage.py +254 -0
- openschichtplaner5_api-1.1.0/tests/test_health_extended.py +108 -0
- openschichtplaner5_api-1.1.0/tests/test_ical.py +536 -0
- openschichtplaner5_api-1.1.0/tests/test_ical_coverage.py +327 -0
- openschichtplaner5_api-1.1.0/tests/test_ical_feed.py +142 -0
- openschichtplaner5_api-1.1.0/tests/test_int_env.py +31 -0
- openschichtplaner5_api-1.1.0/tests/test_integration_workflow.py +285 -0
- openschichtplaner5_api-1.1.0/tests/test_jwt_secret_resolution.py +60 -0
- openschichtplaner5_api-1.1.0/tests/test_log_file_handler.py +30 -0
- openschichtplaner5_api-1.1.0/tests/test_main_dashboard.py +113 -0
- openschichtplaner5_api-1.1.0/tests/test_main_dashboard_upcoming.py +47 -0
- openschichtplaner5_api-1.1.0/tests/test_main_error_handler.py +36 -0
- openschichtplaner5_api-1.1.0/tests/test_master_data_create_shift.py +99 -0
- openschichtplaner5_api-1.1.0/tests/test_misc_self_service.py +194 -0
- openschichtplaner5_api-1.1.0/tests/test_misc_swap_email.py +69 -0
- openschichtplaner5_api-1.1.0/tests/test_new_features.py +252 -0
- openschichtplaner5_api-1.1.0/tests/test_notification_settings.py +153 -0
- openschichtplaner5_api-1.1.0/tests/test_notifications.py +321 -0
- openschichtplaner5_api-1.1.0/tests/test_notifications_internals.py +114 -0
- openschichtplaner5_api-1.1.0/tests/test_openapi_tags.py +29 -0
- openschichtplaner5_api-1.1.0/tests/test_orm.py +465 -0
- openschichtplaner5_api-1.1.0/tests/test_orm_mirror.py +362 -0
- openschichtplaner5_api-1.1.0/tests/test_orm_sync.py +227 -0
- openschichtplaner5_api-1.1.0/tests/test_overtime.py +358 -0
- openschichtplaner5_api-1.1.0/tests/test_overtime_calc.py +58 -0
- openschichtplaner5_api-1.1.0/tests/test_pagination.py +139 -0
- openschichtplaner5_api-1.1.0/tests/test_postgresql_backend.py +268 -0
- openschichtplaner5_api-1.1.0/tests/test_qualification_internals.py +64 -0
- openschichtplaner5_api-1.1.0/tests/test_qualification_matrix.py +260 -0
- openschichtplaner5_api-1.1.0/tests/test_rate_limit_dashboard.py +281 -0
- openschichtplaner5_api-1.1.0/tests/test_rate_limit_feedback.py +111 -0
- openschichtplaner5_api-1.1.0/tests/test_rbac.py +273 -0
- openschichtplaner5_api-1.1.0/tests/test_recurring_shifts.py +397 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_capacity.py +85 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_capacity_year.py +68 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_fairness.py +105 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_helpers.py +57 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_import_absences.py +62 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_monthly.py +58 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_quality.py +92 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_simulation.py +80 -0
- openschichtplaner5_api-1.1.0/tests/test_reports_warnings.py +79 -0
- openschichtplaner5_api-1.1.0/tests/test_response_times.py +34 -0
- openschichtplaner5_api-1.1.0/tests/test_restr_check.py +110 -0
- openschichtplaner5_api-1.1.0/tests/test_schedule.py +106 -0
- openschichtplaner5_api-1.1.0/tests/test_schedule_comments.py +361 -0
- openschichtplaner5_api-1.1.0/tests/test_schedule_conflict_helpers.py +49 -0
- openschichtplaner5_api-1.1.0/tests/test_schedule_coverage.py +500 -0
- openschichtplaner5_api-1.1.0/tests/test_schedule_pdf.py +425 -0
- openschichtplaner5_api-1.1.0/tests/test_scheduled_reports.py +999 -0
- openschichtplaner5_api-1.1.0/tests/test_schemas.py +53 -0
- openschichtplaner5_api-1.1.0/tests/test_search.py +83 -0
- openschichtplaner5_api-1.1.0/tests/test_security_headers.py +146 -0
- openschichtplaner5_api-1.1.0/tests/test_security_round4.py +123 -0
- openschichtplaner5_api-1.1.0/tests/test_security_round5.py +173 -0
- openschichtplaner5_api-1.1.0/tests/test_security_round6.py +108 -0
- openschichtplaner5_api-1.1.0/tests/test_simulation.py +292 -0
- openschichtplaner5_api-1.1.0/tests/test_soft_delete_employees.py +122 -0
- openschichtplaner5_api-1.1.0/tests/test_sqlite_adapter.py +214 -0
- openschichtplaner5_api-1.1.0/tests/test_str_env.py +25 -0
- openschichtplaner5_api-1.1.0/tests/test_structured_logging.py +172 -0
- openschichtplaner5_api-1.1.0/tests/test_swap_notifications.py +444 -0
- openschichtplaner5_api-1.1.0/tests/test_swap_self_service.py +238 -0
- openschichtplaner5_api-1.1.0/tests/test_targeted.py +641 -0
- openschichtplaner5_api-1.1.0/tests/test_webhooks.py +493 -0
- openschichtplaner5_api-1.1.0/tests/test_work_time_helpers.py +144 -0
- openschichtplaner5_api-1.1.0/tests/test_work_time_rules.py +490 -0
- openschichtplaner5_api-1.1.0/tests/test_write_paths.py +538 -0
- openschichtplaner5_api-1.1.0/tests/test_xlsx_export.py +81 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matthias Schabhüttl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openschichtplaner5-api
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: REST API of OpenSchichtplaner5 — the FastAPI service layer over libopenschichtplaner5 (sp5lib): auth/2FA, employees, schedule, absences, reports, notifications and more.
|
|
5
|
+
Author-email: Matthias Schabhüttl <matthias@matthiasschabhuettl.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mschabhuettl/openschichtplaner5-api
|
|
8
|
+
Project-URL: Source, https://github.com/mschabhuettl/openschichtplaner5-api
|
|
9
|
+
Project-URL: Changelog, https://github.com/mschabhuettl/openschichtplaner5-api/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Issues, https://github.com/mschabhuettl/openschichtplaner5-api/issues
|
|
11
|
+
Project-URL: Main application, https://github.com/mschabhuettl/openschichtplaner5
|
|
12
|
+
Project-URL: Core library, https://github.com/mschabhuettl/libopenschichtplaner5
|
|
13
|
+
Keywords: schichtplaner5,shift-planning,fastapi,rest-api,scheduling
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Framework :: FastAPI
|
|
22
|
+
Classifier: Topic :: Office/Business :: Scheduling
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: fastapi!=0.136.3,>=0.104.0
|
|
27
|
+
Requires-Dist: uvicorn[standard]>=0.24.0
|
|
28
|
+
Requires-Dist: pydantic>=2.0.0
|
|
29
|
+
Requires-Dist: starlette>=0.27.0
|
|
30
|
+
Requires-Dist: anyio>=3.7.0
|
|
31
|
+
Requires-Dist: httpx>=0.24.0
|
|
32
|
+
Requires-Dist: python-multipart>=0.0.7
|
|
33
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
34
|
+
Requires-Dist: slowapi>=0.1.9
|
|
35
|
+
Requires-Dist: fpdf2>=2.7.0
|
|
36
|
+
Requires-Dist: bcrypt>=4.0.0
|
|
37
|
+
Requires-Dist: PyJWT>=2.8.0
|
|
38
|
+
Requires-Dist: pyotp>=2.9.0
|
|
39
|
+
Requires-Dist: qrcode[pil]>=7.4
|
|
40
|
+
Requires-Dist: openpyxl>=3.1.0
|
|
41
|
+
Requires-Dist: psutil>=5.9.0
|
|
42
|
+
Requires-Dist: Pillow>=10.0.0
|
|
43
|
+
Requires-Dist: SQLAlchemy>=2.0.0
|
|
44
|
+
Requires-Dist: libopenschichtplaner5[postgres]>=1.6.0
|
|
45
|
+
Provides-Extra: dev
|
|
46
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
47
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
48
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
49
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
50
|
+
Dynamic: license-file
|
|
51
|
+
|
|
52
|
+
# openschichtplaner5-api
|
|
53
|
+
|
|
54
|
+
[](https://github.com/mschabhuettl/openschichtplaner5-api/actions/workflows/ci.yml)
|
|
55
|
+
[](LICENSE)
|
|
56
|
+
|
|
57
|
+
The REST API behind [**OpenSchichtplaner5**](https://github.com/mschabhuettl/openschichtplaner5) —
|
|
58
|
+
a pip-installable FastAPI service over
|
|
59
|
+
[**libopenschichtplaner5**](https://github.com/mschabhuettl/libopenschichtplaner5) (`sp5lib`),
|
|
60
|
+
serving shift-planning data from the original *Schichtplaner5* FoxPro `.DBF` files or the
|
|
61
|
+
SQLite/PostgreSQL mirror: auth/2FA with JWT sessions, employees, schedule, absences,
|
|
62
|
+
reports/exports, notifications (SSE), webhooks, iCal feeds and more.
|
|
63
|
+
|
|
64
|
+
> **Import name:** the distribution is `openschichtplaner5-api`, but the importable
|
|
65
|
+
> package is **`sp5api`** (mirroring `libopenschichtplaner5` → `sp5lib`).
|
|
66
|
+
> It was extracted from the main app's `backend/api/` with full git history.
|
|
67
|
+
|
|
68
|
+
## What's inside
|
|
69
|
+
|
|
70
|
+
| Module | Purpose |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `sp5api.main` | The FastAPI application (`sp5api.main:app`) — middlewares, health/metrics, SPA serving |
|
|
73
|
+
| `sp5api.routers.*` | One router per domain: `auth`, `employees`, `schedule`, `absences`, `reports`, `notifications`, `availability`, `overtime`, `qualification_matrix`, `recurring_shifts`, `ical`, `webhooks`, `admin`, … |
|
|
74
|
+
| `sp5api.dependencies` | Session store, JWT, rate limiting, logging, DB wiring |
|
|
75
|
+
| `sp5api.schemas` / `sp5api.types` | Pydantic models / type aliases |
|
|
76
|
+
| `sp5api.cache` / `sp5api.rate_limit_store` | Response caching, rate-limit event log |
|
|
77
|
+
|
|
78
|
+
## Installation
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pip install "openschichtplaner5-api @ git+https://github.com/mschabhuettl/openschichtplaner5-api.git@main"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
(PyPI release pending — once published: `pip install openschichtplaner5-api`.)
|
|
85
|
+
|
|
86
|
+
## Running
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
SP5_DB_PATH=/path/to/SP5/Daten python -m uvicorn sp5api.main:app --host 0.0.0.0 --port 8000
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Key environment variables
|
|
93
|
+
|
|
94
|
+
| Variable | Default | Purpose |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| `SP5_DB_PATH` | *(set it!)* | Directory with the Schichtplaner5 `.DBF` files |
|
|
97
|
+
| `SP5_BACKEND_DIR` | package parent dir | Host-app resource root: `<dir>/data`, `<dir>/api/data`, `<dir>/api/uploads`, alembic config. Shared contract with `sp5lib` — set it in installed deployments |
|
|
98
|
+
| `SP5_FRONTEND_DIST` | `<SP5_BACKEND_DIR>/../frontend/dist` | Built SPA to serve at `/` (skipped if absent → API-only mode) |
|
|
99
|
+
| `SP5_JWT_SECRET` / `SECRET_KEY` | random per process | JWT signing secret |
|
|
100
|
+
| `SP5_DEV_MODE` | off | Dev bypass token — never in production |
|
|
101
|
+
| `ALLOWED_ORIGINS` | localhost:5173/8000 | CORS origins (comma-separated) |
|
|
102
|
+
| `DB_BACKEND` / `DATABASE_URL` | `dbf` | Switch to the PostgreSQL mirror (via `sp5lib`) |
|
|
103
|
+
|
|
104
|
+
The full list (rate limits, brute-force lockout, SMTP, logging, password policy …) is
|
|
105
|
+
documented in the main app's [`.env.example`](https://github.com/mschabhuettl/openschichtplaner5/blob/main/.env.example).
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
python3 -m venv .venv && . .venv/bin/activate
|
|
111
|
+
pip install -e ".[dev]"
|
|
112
|
+
ruff check .
|
|
113
|
+
pytest
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
To develop against a local clone of the library instead of the PyPI release:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
pip install -e "../libopenschichtplaner5[postgres]"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`data/` and `api/data/` at the repo root are runtime-state seeds (skills, wishes,
|
|
123
|
+
notification settings) used by the test suite — the same layout the main app keeps
|
|
124
|
+
under `backend/`, resolved via `SP5_BACKEND_DIR`. `tests/fixtures/` holds the DBF
|
|
125
|
+
fixture database.
|
|
126
|
+
|
|
127
|
+
## Releasing
|
|
128
|
+
|
|
129
|
+
Tag `vX.Y.Z` and push — the [release workflow](.github/workflows/release.yml) builds
|
|
130
|
+
sdist+wheel and publishes to PyPI via Trusted Publishing (OIDC).
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# openschichtplaner5-api
|
|
2
|
+
|
|
3
|
+
[](https://github.com/mschabhuettl/openschichtplaner5-api/actions/workflows/ci.yml)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
The REST API behind [**OpenSchichtplaner5**](https://github.com/mschabhuettl/openschichtplaner5) —
|
|
7
|
+
a pip-installable FastAPI service over
|
|
8
|
+
[**libopenschichtplaner5**](https://github.com/mschabhuettl/libopenschichtplaner5) (`sp5lib`),
|
|
9
|
+
serving shift-planning data from the original *Schichtplaner5* FoxPro `.DBF` files or the
|
|
10
|
+
SQLite/PostgreSQL mirror: auth/2FA with JWT sessions, employees, schedule, absences,
|
|
11
|
+
reports/exports, notifications (SSE), webhooks, iCal feeds and more.
|
|
12
|
+
|
|
13
|
+
> **Import name:** the distribution is `openschichtplaner5-api`, but the importable
|
|
14
|
+
> package is **`sp5api`** (mirroring `libopenschichtplaner5` → `sp5lib`).
|
|
15
|
+
> It was extracted from the main app's `backend/api/` with full git history.
|
|
16
|
+
|
|
17
|
+
## What's inside
|
|
18
|
+
|
|
19
|
+
| Module | Purpose |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `sp5api.main` | The FastAPI application (`sp5api.main:app`) — middlewares, health/metrics, SPA serving |
|
|
22
|
+
| `sp5api.routers.*` | One router per domain: `auth`, `employees`, `schedule`, `absences`, `reports`, `notifications`, `availability`, `overtime`, `qualification_matrix`, `recurring_shifts`, `ical`, `webhooks`, `admin`, … |
|
|
23
|
+
| `sp5api.dependencies` | Session store, JWT, rate limiting, logging, DB wiring |
|
|
24
|
+
| `sp5api.schemas` / `sp5api.types` | Pydantic models / type aliases |
|
|
25
|
+
| `sp5api.cache` / `sp5api.rate_limit_store` | Response caching, rate-limit event log |
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install "openschichtplaner5-api @ git+https://github.com/mschabhuettl/openschichtplaner5-api.git@main"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
(PyPI release pending — once published: `pip install openschichtplaner5-api`.)
|
|
34
|
+
|
|
35
|
+
## Running
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
SP5_DB_PATH=/path/to/SP5/Daten python -m uvicorn sp5api.main:app --host 0.0.0.0 --port 8000
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Key environment variables
|
|
42
|
+
|
|
43
|
+
| Variable | Default | Purpose |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `SP5_DB_PATH` | *(set it!)* | Directory with the Schichtplaner5 `.DBF` files |
|
|
46
|
+
| `SP5_BACKEND_DIR` | package parent dir | Host-app resource root: `<dir>/data`, `<dir>/api/data`, `<dir>/api/uploads`, alembic config. Shared contract with `sp5lib` — set it in installed deployments |
|
|
47
|
+
| `SP5_FRONTEND_DIST` | `<SP5_BACKEND_DIR>/../frontend/dist` | Built SPA to serve at `/` (skipped if absent → API-only mode) |
|
|
48
|
+
| `SP5_JWT_SECRET` / `SECRET_KEY` | random per process | JWT signing secret |
|
|
49
|
+
| `SP5_DEV_MODE` | off | Dev bypass token — never in production |
|
|
50
|
+
| `ALLOWED_ORIGINS` | localhost:5173/8000 | CORS origins (comma-separated) |
|
|
51
|
+
| `DB_BACKEND` / `DATABASE_URL` | `dbf` | Switch to the PostgreSQL mirror (via `sp5lib`) |
|
|
52
|
+
|
|
53
|
+
The full list (rate limits, brute-force lockout, SMTP, logging, password policy …) is
|
|
54
|
+
documented in the main app's [`.env.example`](https://github.com/mschabhuettl/openschichtplaner5/blob/main/.env.example).
|
|
55
|
+
|
|
56
|
+
## Development
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
python3 -m venv .venv && . .venv/bin/activate
|
|
60
|
+
pip install -e ".[dev]"
|
|
61
|
+
ruff check .
|
|
62
|
+
pytest
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
To develop against a local clone of the library instead of the PyPI release:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install -e "../libopenschichtplaner5[postgres]"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`data/` and `api/data/` at the repo root are runtime-state seeds (skills, wishes,
|
|
72
|
+
notification settings) used by the test suite — the same layout the main app keeps
|
|
73
|
+
under `backend/`, resolved via `SP5_BACKEND_DIR`. `tests/fixtures/` holds the DBF
|
|
74
|
+
fixture database.
|
|
75
|
+
|
|
76
|
+
## Releasing
|
|
77
|
+
|
|
78
|
+
Tag `vX.Y.Z` and push — the [release workflow](.github/workflows/release.yml) builds
|
|
79
|
+
sdist+wheel and publishes to PyPI via Trusted Publishing (OIDC).
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openschichtplaner5-api
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: REST API of OpenSchichtplaner5 — the FastAPI service layer over libopenschichtplaner5 (sp5lib): auth/2FA, employees, schedule, absences, reports, notifications and more.
|
|
5
|
+
Author-email: Matthias Schabhüttl <matthias@matthiasschabhuettl.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mschabhuettl/openschichtplaner5-api
|
|
8
|
+
Project-URL: Source, https://github.com/mschabhuettl/openschichtplaner5-api
|
|
9
|
+
Project-URL: Changelog, https://github.com/mschabhuettl/openschichtplaner5-api/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Issues, https://github.com/mschabhuettl/openschichtplaner5-api/issues
|
|
11
|
+
Project-URL: Main application, https://github.com/mschabhuettl/openschichtplaner5
|
|
12
|
+
Project-URL: Core library, https://github.com/mschabhuettl/libopenschichtplaner5
|
|
13
|
+
Keywords: schichtplaner5,shift-planning,fastapi,rest-api,scheduling
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Framework :: FastAPI
|
|
22
|
+
Classifier: Topic :: Office/Business :: Scheduling
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: fastapi!=0.136.3,>=0.104.0
|
|
27
|
+
Requires-Dist: uvicorn[standard]>=0.24.0
|
|
28
|
+
Requires-Dist: pydantic>=2.0.0
|
|
29
|
+
Requires-Dist: starlette>=0.27.0
|
|
30
|
+
Requires-Dist: anyio>=3.7.0
|
|
31
|
+
Requires-Dist: httpx>=0.24.0
|
|
32
|
+
Requires-Dist: python-multipart>=0.0.7
|
|
33
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
34
|
+
Requires-Dist: slowapi>=0.1.9
|
|
35
|
+
Requires-Dist: fpdf2>=2.7.0
|
|
36
|
+
Requires-Dist: bcrypt>=4.0.0
|
|
37
|
+
Requires-Dist: PyJWT>=2.8.0
|
|
38
|
+
Requires-Dist: pyotp>=2.9.0
|
|
39
|
+
Requires-Dist: qrcode[pil]>=7.4
|
|
40
|
+
Requires-Dist: openpyxl>=3.1.0
|
|
41
|
+
Requires-Dist: psutil>=5.9.0
|
|
42
|
+
Requires-Dist: Pillow>=10.0.0
|
|
43
|
+
Requires-Dist: SQLAlchemy>=2.0.0
|
|
44
|
+
Requires-Dist: libopenschichtplaner5[postgres]>=1.6.0
|
|
45
|
+
Provides-Extra: dev
|
|
46
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
47
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
48
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
49
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
50
|
+
Dynamic: license-file
|
|
51
|
+
|
|
52
|
+
# openschichtplaner5-api
|
|
53
|
+
|
|
54
|
+
[](https://github.com/mschabhuettl/openschichtplaner5-api/actions/workflows/ci.yml)
|
|
55
|
+
[](LICENSE)
|
|
56
|
+
|
|
57
|
+
The REST API behind [**OpenSchichtplaner5**](https://github.com/mschabhuettl/openschichtplaner5) —
|
|
58
|
+
a pip-installable FastAPI service over
|
|
59
|
+
[**libopenschichtplaner5**](https://github.com/mschabhuettl/libopenschichtplaner5) (`sp5lib`),
|
|
60
|
+
serving shift-planning data from the original *Schichtplaner5* FoxPro `.DBF` files or the
|
|
61
|
+
SQLite/PostgreSQL mirror: auth/2FA with JWT sessions, employees, schedule, absences,
|
|
62
|
+
reports/exports, notifications (SSE), webhooks, iCal feeds and more.
|
|
63
|
+
|
|
64
|
+
> **Import name:** the distribution is `openschichtplaner5-api`, but the importable
|
|
65
|
+
> package is **`sp5api`** (mirroring `libopenschichtplaner5` → `sp5lib`).
|
|
66
|
+
> It was extracted from the main app's `backend/api/` with full git history.
|
|
67
|
+
|
|
68
|
+
## What's inside
|
|
69
|
+
|
|
70
|
+
| Module | Purpose |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `sp5api.main` | The FastAPI application (`sp5api.main:app`) — middlewares, health/metrics, SPA serving |
|
|
73
|
+
| `sp5api.routers.*` | One router per domain: `auth`, `employees`, `schedule`, `absences`, `reports`, `notifications`, `availability`, `overtime`, `qualification_matrix`, `recurring_shifts`, `ical`, `webhooks`, `admin`, … |
|
|
74
|
+
| `sp5api.dependencies` | Session store, JWT, rate limiting, logging, DB wiring |
|
|
75
|
+
| `sp5api.schemas` / `sp5api.types` | Pydantic models / type aliases |
|
|
76
|
+
| `sp5api.cache` / `sp5api.rate_limit_store` | Response caching, rate-limit event log |
|
|
77
|
+
|
|
78
|
+
## Installation
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pip install "openschichtplaner5-api @ git+https://github.com/mschabhuettl/openschichtplaner5-api.git@main"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
(PyPI release pending — once published: `pip install openschichtplaner5-api`.)
|
|
85
|
+
|
|
86
|
+
## Running
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
SP5_DB_PATH=/path/to/SP5/Daten python -m uvicorn sp5api.main:app --host 0.0.0.0 --port 8000
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Key environment variables
|
|
93
|
+
|
|
94
|
+
| Variable | Default | Purpose |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| `SP5_DB_PATH` | *(set it!)* | Directory with the Schichtplaner5 `.DBF` files |
|
|
97
|
+
| `SP5_BACKEND_DIR` | package parent dir | Host-app resource root: `<dir>/data`, `<dir>/api/data`, `<dir>/api/uploads`, alembic config. Shared contract with `sp5lib` — set it in installed deployments |
|
|
98
|
+
| `SP5_FRONTEND_DIST` | `<SP5_BACKEND_DIR>/../frontend/dist` | Built SPA to serve at `/` (skipped if absent → API-only mode) |
|
|
99
|
+
| `SP5_JWT_SECRET` / `SECRET_KEY` | random per process | JWT signing secret |
|
|
100
|
+
| `SP5_DEV_MODE` | off | Dev bypass token — never in production |
|
|
101
|
+
| `ALLOWED_ORIGINS` | localhost:5173/8000 | CORS origins (comma-separated) |
|
|
102
|
+
| `DB_BACKEND` / `DATABASE_URL` | `dbf` | Switch to the PostgreSQL mirror (via `sp5lib`) |
|
|
103
|
+
|
|
104
|
+
The full list (rate limits, brute-force lockout, SMTP, logging, password policy …) is
|
|
105
|
+
documented in the main app's [`.env.example`](https://github.com/mschabhuettl/openschichtplaner5/blob/main/.env.example).
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
python3 -m venv .venv && . .venv/bin/activate
|
|
111
|
+
pip install -e ".[dev]"
|
|
112
|
+
ruff check .
|
|
113
|
+
pytest
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
To develop against a local clone of the library instead of the PyPI release:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
pip install -e "../libopenschichtplaner5[postgres]"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`data/` and `api/data/` at the repo root are runtime-state seeds (skills, wishes,
|
|
123
|
+
notification settings) used by the test suite — the same layout the main app keeps
|
|
124
|
+
under `backend/`, resolved via `SP5_BACKEND_DIR`. `tests/fixtures/` holds the DBF
|
|
125
|
+
fixture database.
|
|
126
|
+
|
|
127
|
+
## Releasing
|
|
128
|
+
|
|
129
|
+
Tag `vX.Y.Z` and push — the [release workflow](.github/workflows/release.yml) builds
|
|
130
|
+
sdist+wheel and publishes to PyPI via Trusted Publishing (OIDC).
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
openschichtplaner5_api.egg-info/PKG-INFO
|
|
5
|
+
openschichtplaner5_api.egg-info/SOURCES.txt
|
|
6
|
+
openschichtplaner5_api.egg-info/dependency_links.txt
|
|
7
|
+
openschichtplaner5_api.egg-info/requires.txt
|
|
8
|
+
openschichtplaner5_api.egg-info/top_level.txt
|
|
9
|
+
sp5api/__init__.py
|
|
10
|
+
sp5api/_paths.py
|
|
11
|
+
sp5api/cache.py
|
|
12
|
+
sp5api/dependencies.py
|
|
13
|
+
sp5api/main.py
|
|
14
|
+
sp5api/rate_limit_store.py
|
|
15
|
+
sp5api/schemas.py
|
|
16
|
+
sp5api/types.py
|
|
17
|
+
sp5api/routers/__init__.py
|
|
18
|
+
sp5api/routers/absences.py
|
|
19
|
+
sp5api/routers/admin.py
|
|
20
|
+
sp5api/routers/auth.py
|
|
21
|
+
sp5api/routers/availability.py
|
|
22
|
+
sp5api/routers/companies.py
|
|
23
|
+
sp5api/routers/conflict_report.py
|
|
24
|
+
sp5api/routers/email.py
|
|
25
|
+
sp5api/routers/employees.py
|
|
26
|
+
sp5api/routers/events.py
|
|
27
|
+
sp5api/routers/export_scheduler.py
|
|
28
|
+
sp5api/routers/ical.py
|
|
29
|
+
sp5api/routers/master_data.py
|
|
30
|
+
sp5api/routers/misc.py
|
|
31
|
+
sp5api/routers/notification_settings.py
|
|
32
|
+
sp5api/routers/notifications.py
|
|
33
|
+
sp5api/routers/orm_mirror.py
|
|
34
|
+
sp5api/routers/overtime.py
|
|
35
|
+
sp5api/routers/qualification_matrix.py
|
|
36
|
+
sp5api/routers/recurring_shifts.py
|
|
37
|
+
sp5api/routers/reports.py
|
|
38
|
+
sp5api/routers/schedule.py
|
|
39
|
+
sp5api/routers/schedule_comments.py
|
|
40
|
+
sp5api/routers/schedule_pdf.py
|
|
41
|
+
sp5api/routers/scheduled_reports.py
|
|
42
|
+
sp5api/routers/webhooks.py
|
|
43
|
+
sp5api/routers/work_time_rules.py
|
|
44
|
+
tests/test_absence_stats.py
|
|
45
|
+
tests/test_absence_status_router.py
|
|
46
|
+
tests/test_absences_create.py
|
|
47
|
+
tests/test_absences_helpers.py
|
|
48
|
+
tests/test_admin_backup_helpers.py
|
|
49
|
+
tests/test_admin_endpoints_coverage.py
|
|
50
|
+
tests/test_api.py
|
|
51
|
+
tests/test_api_versioning.py
|
|
52
|
+
tests/test_auth.py
|
|
53
|
+
tests/test_auth_2fa_coverage.py
|
|
54
|
+
tests/test_auth_change_password.py
|
|
55
|
+
tests/test_auth_helpers.py
|
|
56
|
+
tests/test_auth_login_security.py
|
|
57
|
+
tests/test_auth_reset_password_email.py
|
|
58
|
+
tests/test_auto_migrate.py
|
|
59
|
+
tests/test_auto_scheduling_improved.py
|
|
60
|
+
tests/test_availability.py
|
|
61
|
+
tests/test_bulk_group_assign.py
|
|
62
|
+
tests/test_business_logic.py
|
|
63
|
+
tests/test_cache.py
|
|
64
|
+
tests/test_cache_control_prefixes.py
|
|
65
|
+
tests/test_cache_sse_integration.py
|
|
66
|
+
tests/test_companies_coverage.py
|
|
67
|
+
tests/test_company.py
|
|
68
|
+
tests/test_company_api.py
|
|
69
|
+
tests/test_comprehensive.py
|
|
70
|
+
tests/test_conflict_detection.py
|
|
71
|
+
tests/test_conflict_report.py
|
|
72
|
+
tests/test_conflict_report_internals.py
|
|
73
|
+
tests/test_conflicts.py
|
|
74
|
+
tests/test_coverage_absences_misc.py
|
|
75
|
+
tests/test_coverage_boost_admin.py
|
|
76
|
+
tests/test_coverage_boost_employees.py
|
|
77
|
+
tests/test_coverage_boost_misc.py
|
|
78
|
+
tests/test_coverage_boost_misc2.py
|
|
79
|
+
tests/test_coverage_boost_reports.py
|
|
80
|
+
tests/test_coverage_boost_reports2.py
|
|
81
|
+
tests/test_coverage_boost_schedule.py
|
|
82
|
+
tests/test_coverage_boost_schedule2.py
|
|
83
|
+
tests/test_coverage_gaps.py
|
|
84
|
+
tests/test_coverage_routes_targeted.py
|
|
85
|
+
tests/test_csv_import.py
|
|
86
|
+
tests/test_data_integrity.py
|
|
87
|
+
tests/test_dbf_field_validation.py
|
|
88
|
+
tests/test_dbf_writer.py
|
|
89
|
+
tests/test_dbf_writer_coverage.py
|
|
90
|
+
tests/test_dependencies_auth.py
|
|
91
|
+
tests/test_dev_mode.py
|
|
92
|
+
tests/test_e2e_workflows.py
|
|
93
|
+
tests/test_edge_cases.py
|
|
94
|
+
tests/test_email_api.py
|
|
95
|
+
tests/test_email_service.py
|
|
96
|
+
tests/test_employees.py
|
|
97
|
+
tests/test_error_paths.py
|
|
98
|
+
tests/test_events_broadcast.py
|
|
99
|
+
tests/test_export_scheduler.py
|
|
100
|
+
tests/test_export_scheduler_coverage.py
|
|
101
|
+
tests/test_health_extended.py
|
|
102
|
+
tests/test_ical.py
|
|
103
|
+
tests/test_ical_coverage.py
|
|
104
|
+
tests/test_ical_feed.py
|
|
105
|
+
tests/test_int_env.py
|
|
106
|
+
tests/test_integration_workflow.py
|
|
107
|
+
tests/test_jwt_secret_resolution.py
|
|
108
|
+
tests/test_log_file_handler.py
|
|
109
|
+
tests/test_main_dashboard.py
|
|
110
|
+
tests/test_main_dashboard_upcoming.py
|
|
111
|
+
tests/test_main_error_handler.py
|
|
112
|
+
tests/test_master_data_create_shift.py
|
|
113
|
+
tests/test_misc_self_service.py
|
|
114
|
+
tests/test_misc_swap_email.py
|
|
115
|
+
tests/test_new_features.py
|
|
116
|
+
tests/test_notification_settings.py
|
|
117
|
+
tests/test_notifications.py
|
|
118
|
+
tests/test_notifications_internals.py
|
|
119
|
+
tests/test_openapi_tags.py
|
|
120
|
+
tests/test_orm.py
|
|
121
|
+
tests/test_orm_mirror.py
|
|
122
|
+
tests/test_orm_sync.py
|
|
123
|
+
tests/test_overtime.py
|
|
124
|
+
tests/test_overtime_calc.py
|
|
125
|
+
tests/test_pagination.py
|
|
126
|
+
tests/test_postgresql_backend.py
|
|
127
|
+
tests/test_qualification_internals.py
|
|
128
|
+
tests/test_qualification_matrix.py
|
|
129
|
+
tests/test_rate_limit_dashboard.py
|
|
130
|
+
tests/test_rate_limit_feedback.py
|
|
131
|
+
tests/test_rbac.py
|
|
132
|
+
tests/test_recurring_shifts.py
|
|
133
|
+
tests/test_reports_capacity.py
|
|
134
|
+
tests/test_reports_capacity_year.py
|
|
135
|
+
tests/test_reports_fairness.py
|
|
136
|
+
tests/test_reports_helpers.py
|
|
137
|
+
tests/test_reports_import_absences.py
|
|
138
|
+
tests/test_reports_monthly.py
|
|
139
|
+
tests/test_reports_quality.py
|
|
140
|
+
tests/test_reports_simulation.py
|
|
141
|
+
tests/test_reports_warnings.py
|
|
142
|
+
tests/test_response_times.py
|
|
143
|
+
tests/test_restr_check.py
|
|
144
|
+
tests/test_schedule.py
|
|
145
|
+
tests/test_schedule_comments.py
|
|
146
|
+
tests/test_schedule_conflict_helpers.py
|
|
147
|
+
tests/test_schedule_coverage.py
|
|
148
|
+
tests/test_schedule_pdf.py
|
|
149
|
+
tests/test_scheduled_reports.py
|
|
150
|
+
tests/test_schemas.py
|
|
151
|
+
tests/test_search.py
|
|
152
|
+
tests/test_security_headers.py
|
|
153
|
+
tests/test_security_round4.py
|
|
154
|
+
tests/test_security_round5.py
|
|
155
|
+
tests/test_security_round6.py
|
|
156
|
+
tests/test_simulation.py
|
|
157
|
+
tests/test_soft_delete_employees.py
|
|
158
|
+
tests/test_sqlite_adapter.py
|
|
159
|
+
tests/test_str_env.py
|
|
160
|
+
tests/test_structured_logging.py
|
|
161
|
+
tests/test_swap_notifications.py
|
|
162
|
+
tests/test_swap_self_service.py
|
|
163
|
+
tests/test_targeted.py
|
|
164
|
+
tests/test_webhooks.py
|
|
165
|
+
tests/test_work_time_helpers.py
|
|
166
|
+
tests/test_work_time_rules.py
|
|
167
|
+
tests/test_write_paths.py
|
|
168
|
+
tests/test_xlsx_export.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
fastapi!=0.136.3,>=0.104.0
|
|
2
|
+
uvicorn[standard]>=0.24.0
|
|
3
|
+
pydantic>=2.0.0
|
|
4
|
+
starlette>=0.27.0
|
|
5
|
+
anyio>=3.7.0
|
|
6
|
+
httpx>=0.24.0
|
|
7
|
+
python-multipart>=0.0.7
|
|
8
|
+
python-dotenv>=1.0.0
|
|
9
|
+
slowapi>=0.1.9
|
|
10
|
+
fpdf2>=2.7.0
|
|
11
|
+
bcrypt>=4.0.0
|
|
12
|
+
PyJWT>=2.8.0
|
|
13
|
+
pyotp>=2.9.0
|
|
14
|
+
qrcode[pil]>=7.4
|
|
15
|
+
openpyxl>=3.1.0
|
|
16
|
+
psutil>=5.9.0
|
|
17
|
+
Pillow>=10.0.0
|
|
18
|
+
SQLAlchemy>=2.0.0
|
|
19
|
+
libopenschichtplaner5[postgres]>=1.6.0
|
|
20
|
+
|
|
21
|
+
[dev]
|
|
22
|
+
pytest>=7.4.0
|
|
23
|
+
pytest-cov>=4.1.0
|
|
24
|
+
pytest-asyncio>=0.23.0
|
|
25
|
+
ruff>=0.1.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sp5api
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "openschichtplaner5-api"
|
|
7
|
+
version = "1.1.0"
|
|
8
|
+
description = "REST API of OpenSchichtplaner5 — the FastAPI service layer over libopenschichtplaner5 (sp5lib): auth/2FA, employees, schedule, absences, reports, notifications and more."
|
|
9
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
authors = [{ name = "Matthias Schabhüttl", email = "matthias@matthiasschabhuettl.com" }]
|
|
13
|
+
requires-python = ">=3.11"
|
|
14
|
+
keywords = ["schichtplaner5", "shift-planning", "fastapi", "rest-api", "scheduling"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 5 - Production/Stable",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Framework :: FastAPI",
|
|
24
|
+
"Topic :: Office/Business :: Scheduling",
|
|
25
|
+
]
|
|
26
|
+
dependencies = [
|
|
27
|
+
# 0.136.3 is a malicious release (MAL-2026-4750): it tampers with
|
|
28
|
+
# pyproject.toml/PKG-INFO to inject an undocumented 'fastar' dependency. Exclude it.
|
|
29
|
+
"fastapi>=0.104.0,!=0.136.3",
|
|
30
|
+
"uvicorn[standard]>=0.24.0",
|
|
31
|
+
"pydantic>=2.0.0",
|
|
32
|
+
"starlette>=0.27.0",
|
|
33
|
+
"anyio>=3.7.0",
|
|
34
|
+
"httpx>=0.24.0",
|
|
35
|
+
"python-multipart>=0.0.7",
|
|
36
|
+
"python-dotenv>=1.0.0",
|
|
37
|
+
"slowapi>=0.1.9",
|
|
38
|
+
"fpdf2>=2.7.0",
|
|
39
|
+
"bcrypt>=4.0.0",
|
|
40
|
+
"PyJWT>=2.8.0",
|
|
41
|
+
"pyotp>=2.9.0",
|
|
42
|
+
"qrcode[pil]>=7.4",
|
|
43
|
+
"openpyxl>=3.1.0",
|
|
44
|
+
"psutil>=5.9.0",
|
|
45
|
+
"Pillow>=10.0.0",
|
|
46
|
+
"SQLAlchemy>=2.0.0",
|
|
47
|
+
# Core library (DBF bridge + ORM/sync), maintained in its own repo and
|
|
48
|
+
# released to PyPI. Importable as `sp5lib`. Same reference style as the
|
|
49
|
+
# main application uses.
|
|
50
|
+
"libopenschichtplaner5[postgres]>=1.6.0",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[project.optional-dependencies]
|
|
54
|
+
dev = [
|
|
55
|
+
"pytest>=7.4.0",
|
|
56
|
+
"pytest-cov>=4.1.0",
|
|
57
|
+
"pytest-asyncio>=0.23.0",
|
|
58
|
+
"ruff>=0.1.0",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[project.urls]
|
|
62
|
+
Homepage = "https://github.com/mschabhuettl/openschichtplaner5-api"
|
|
63
|
+
Source = "https://github.com/mschabhuettl/openschichtplaner5-api"
|
|
64
|
+
Changelog = "https://github.com/mschabhuettl/openschichtplaner5-api/blob/main/CHANGELOG.md"
|
|
65
|
+
Issues = "https://github.com/mschabhuettl/openschichtplaner5-api/issues"
|
|
66
|
+
"Main application" = "https://github.com/mschabhuettl/openschichtplaner5"
|
|
67
|
+
"Core library" = "https://github.com/mschabhuettl/libopenschichtplaner5"
|
|
68
|
+
|
|
69
|
+
[tool.setuptools]
|
|
70
|
+
packages = ["sp5api", "sp5api.routers"]
|
|
71
|
+
|
|
72
|
+
[tool.coverage.run]
|
|
73
|
+
omit = ["sp5api/types.py"]
|
|
74
|
+
|
|
75
|
+
[tool.ruff]
|
|
76
|
+
target-version = "py312"
|
|
77
|
+
line-length = 100
|
|
78
|
+
|
|
79
|
+
[tool.ruff.lint]
|
|
80
|
+
select = [
|
|
81
|
+
"E", # pycodestyle errors
|
|
82
|
+
"W", # pycodestyle warnings
|
|
83
|
+
"F", # pyflakes
|
|
84
|
+
"I", # isort
|
|
85
|
+
"B", # flake8-bugbear
|
|
86
|
+
"UP", # pyupgrade
|
|
87
|
+
]
|
|
88
|
+
ignore = [
|
|
89
|
+
"E501", # line too long (handled by formatter)
|
|
90
|
+
"E712", # == False / == True comparisons — required for SQLAlchemy WHERE clauses
|
|
91
|
+
"B008", # do not perform function calls in default arguments (FastAPI Depends pattern)
|
|
92
|
+
"B904", # raise-without-from-inside-except — existing codebase, fix incrementally
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
[tool.ruff.lint.per-file-ignores]
|
|
96
|
+
"tests/**" = ["B011", "E402"] # assert False pattern in tests; sys.path manipulation
|
|
97
|
+
"test_smoke.py" = ["E402"] # sys.path manipulation requires imports after
|
|
98
|
+
"sp5api/main.py" = ["E402"] # env/bootstrap setup requires imports after
|
|
99
|
+
"sp5api/routers/reports.py" = ["B905"] # zip() without strict= — existing code
|
|
File without changes
|