Unofficial Python library providing programmatic access to Smartschool's web platform. Access courses, documents, messages, results, agenda, and more through a clean, type-safe API.
Install from PyPI:
pip install smartschoolCreate credentials.yml with your Smartschool credentials:
username: your_username
password: your_password
main_url: your_school.smartschool.be
mfa: your_birthday_or_2fa_secret # YYYY-mm-dd or Google Authenticator secretfrom smartschool import Smartschool, PathCredentials, Courses
session = Smartschool(PathCredentials())
for course in Courses(session):
print(course.name)| Category | Classes | Description |
|---|---|---|
| Courses | TopNavCourses, Courses, CourseList |
Browse courses and download documents |
| Intradesk | Intradesk |
Browse and download files from the intradesk |
| Results | Results, Reports, Periods |
Grades, evaluations, report cards |
| Messages | MessageHeaders, Message, Attachments |
Inbox/outbox, attachments, labels |
| Schedule | SmartschoolLessons, SmartschoolHours |
Daily schedules, class periods |
| Planner | PlannedElements, FutureTasks |
Assignments, deadlines, activities |
| Support | StudentSupportLinks |
School support resources |
Detailed usage guides with examples:
- Authentication - Credential setup and MFA
- Courses & Documents - Browsing courses and downloading files
- Intradesk - Intradesk file management
- Results & Reports - Grades, evaluations, and report cards
- Messages - Inbox, attachments, and message management
- Schedule & Agenda - Lessons, hours, and moment info
- Planner & Tasks - Planned elements and future tasks
- Error Handling - Exception types and handling patterns
git clone https://github.com/svaningelgem/smartschool.git
cd smartschool
pip install poetry
poetry install
# Run tests
poetry run pytest
# Linting & formatting
poetry run ruff check .
poetry run ruff format .- Python: 3.10+
- Core Dependencies: requests, beautifulsoup4, pydantic, pyyaml, logprise
- Optional:
pip install smartschool[mfa]for Google Authenticator 2FA support
GNU General Public License v3.0
Contributions welcome! Please ensure:
- Tests pass:
poetry run pytest - Code is formatted:
poetry run ruff format . - Linting passes:
poetry run ruff check . - Type stubs are updated:
./restub
- Issues: GitHub Issues
- Changelog: CHANGELOG.md