usos-api 0.1.3__tar.gz → 0.3.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.
- {usos_api-0.1.3 → usos_api-0.3.0}/PKG-INFO +4 -2
- {usos_api-0.1.3 → usos_api-0.3.0}/pyproject.toml +2 -2
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/client.py +23 -3
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/connection.py +0 -1
- usos_api-0.3.0/usos_api/helper.py +54 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/models/__init__.py +40 -1
- usos_api-0.3.0/usos_api/models/api_documentation.py +68 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/models/consumer.py +2 -3
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/models/course.py +26 -19
- usos_api-0.3.0/usos_api/models/grade.py +43 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/models/group.py +3 -3
- usos_api-0.3.0/usos_api/models/registration.py +73 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/models/term.py +7 -0
- usos_api-0.3.0/usos_api/services/__init__.py +19 -0
- usos_api-0.3.0/usos_api/services/api_documentation.py +69 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/services/api_server.py +1 -3
- usos_api-0.3.0/usos_api/services/courses.py +52 -0
- usos_api-0.3.0/usos_api/services/grades.py +99 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/services/groups.py +1 -7
- usos_api-0.3.0/usos_api/services/registrations.py +112 -0
- usos_api-0.3.0/usos_api/services/terms.py +39 -0
- usos_api-0.1.3/usos_api/models/grade.py +0 -27
- usos_api-0.1.3/usos_api/services/__init__.py +0 -5
- {usos_api-0.1.3 → usos_api-0.3.0}/README.md +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/__init__.py +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/auth.py +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/exceptions.py +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/logger.py +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/models/lang_dict.py +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/models/programme.py +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/models/user.py +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/services/users.py +0 -0
- {usos_api-0.1.3 → usos_api-0.3.0}/usos_api/utils/__init__.py +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: usos-api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Asynchronous USOS API for Python
|
|
5
5
|
Home-page: https://github.com/Antoni-Czaplicki/usos-api
|
|
6
6
|
Author: Antoni-Czaplicki
|
|
7
7
|
Author-email: 56671347+Antoni-Czaplicki@users.noreply.github.com
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.10,<4.0
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
13
|
Requires-Dist: aiohttp (>=3.9.5,<4.0.0)
|
|
12
14
|
Requires-Dist: oauthlib (>=3.2.2,<4.0.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "usos-api"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "Asynchronous USOS API for Python"
|
|
5
5
|
authors = ["Antoni-Czaplicki <56671347+Antoni-Czaplicki@users.noreply.github.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -9,7 +9,7 @@ repository = "https://github.com/Antoni-Czaplicki/usos-api"
|
|
|
9
9
|
documentation = "https://usos-api.readthedocs.io"
|
|
10
10
|
|
|
11
11
|
[tool.poetry.dependencies]
|
|
12
|
-
python = "^3.
|
|
12
|
+
python = "^3.10"
|
|
13
13
|
aiohttp = "^3.9.5"
|
|
14
14
|
pydantic = "^2.8.2"
|
|
15
15
|
oauthlib = "^3.2.2"
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
3
|
from .connection import USOSAPIConnection
|
|
4
|
+
from .helper import APIHelper
|
|
4
5
|
from .logger import get_logger
|
|
5
|
-
from .services import
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
from .services import (
|
|
7
|
+
APIDocumentationService,
|
|
8
|
+
APIServerService,
|
|
9
|
+
CourseService,
|
|
10
|
+
GradeService,
|
|
11
|
+
GroupService,
|
|
12
|
+
RegistrationService,
|
|
13
|
+
TermService,
|
|
14
|
+
UserService,
|
|
15
|
+
)
|
|
8
16
|
|
|
9
17
|
_LOGGER = get_logger("USOSClient")
|
|
10
18
|
|
|
@@ -16,6 +24,11 @@ class USOSClient:
|
|
|
16
24
|
:var UserService user_service: The user service.
|
|
17
25
|
:var GroupService group_service: The group service.
|
|
18
26
|
:var APIServerService api_server_service: The API server service.
|
|
27
|
+
:var APIDocumentationService api_documentation_service: The API documentation service.
|
|
28
|
+
:var CourseService course_service: The course service.
|
|
29
|
+
:var TermService term_service: The term service.
|
|
30
|
+
:var GradeService grade_service: The grade service.
|
|
31
|
+
:var RegistrationService registration_service: The registration service.
|
|
19
32
|
|
|
20
33
|
:ivar USOSAPIConnection connection: The connection to the USOS API, used for making requests.
|
|
21
34
|
"""
|
|
@@ -35,7 +48,14 @@ class USOSClient:
|
|
|
35
48
|
)
|
|
36
49
|
self.user_service = UserService(self.connection)
|
|
37
50
|
self.group_service = GroupService(self.connection)
|
|
51
|
+
self.course_service = CourseService(self.connection)
|
|
52
|
+
self.term_service = TermService(self.connection)
|
|
53
|
+
self.grade_service = GradeService(self.connection)
|
|
38
54
|
self.api_server_service = APIServerService(self.connection)
|
|
55
|
+
self.api_documentation_service = APIDocumentationService(self.connection)
|
|
56
|
+
self.registration_service = RegistrationService(self.connection)
|
|
57
|
+
|
|
58
|
+
self.helper = APIHelper(self)
|
|
39
59
|
|
|
40
60
|
async def __aenter__(self) -> "USOSClient":
|
|
41
61
|
"""
|
|
@@ -92,7 +92,6 @@ class USOSAPIConnection:
|
|
|
92
92
|
url, headers, body = self.auth_manager.sign_request(
|
|
93
93
|
"".join(url_parts), headers=headers
|
|
94
94
|
)
|
|
95
|
-
print(url, headers, body)
|
|
96
95
|
async with self._session.get(url, params=kwargs, headers=headers) as response:
|
|
97
96
|
await self._handle_response_errors(response)
|
|
98
97
|
return await response.json()
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, List
|
|
2
|
+
|
|
3
|
+
from usos_api.models import CourseEdition, Grade
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from usos_api import USOSClient
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class APIHelper:
|
|
10
|
+
def __init__(self, client: "USOSClient"):
|
|
11
|
+
self.client = client
|
|
12
|
+
|
|
13
|
+
async def get_user_end_grades_with_weights(
|
|
14
|
+
self, current_term_only: bool = False
|
|
15
|
+
) -> List[Grade]:
|
|
16
|
+
"""
|
|
17
|
+
Get user end grades with weights.
|
|
18
|
+
|
|
19
|
+
:param current_term_only: If True, only consider the current term.
|
|
20
|
+
:return: A list of user end grades with weights.
|
|
21
|
+
"""
|
|
22
|
+
ects_by_term = await self.client.course_service.get_user_courses_ects()
|
|
23
|
+
terms = await self.client.term_service.get_terms(list(ects_by_term.keys()))
|
|
24
|
+
term_ids = [
|
|
25
|
+
term.id for term in terms if not current_term_only or term.is_current
|
|
26
|
+
]
|
|
27
|
+
course_ids = [
|
|
28
|
+
course_id
|
|
29
|
+
for term_id in term_ids
|
|
30
|
+
for course_id in ects_by_term[term_id].keys()
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
courses = {
|
|
34
|
+
course.id: course
|
|
35
|
+
for course in await self.client.course_service.get_courses(course_ids)
|
|
36
|
+
}
|
|
37
|
+
grades_by_term = await self.client.grade_service.get_grades_by_terms(term_ids)
|
|
38
|
+
|
|
39
|
+
user_grades = []
|
|
40
|
+
for term in terms:
|
|
41
|
+
if term.id not in term_ids:
|
|
42
|
+
continue
|
|
43
|
+
for course_id, ects in ects_by_term[term.id].items():
|
|
44
|
+
grades = (
|
|
45
|
+
grades_by_term[term.id].get(course_id, {}).get("course_grades", [])
|
|
46
|
+
)
|
|
47
|
+
for grade in grades:
|
|
48
|
+
grade.weight = ects
|
|
49
|
+
grade.course_edition = CourseEdition(
|
|
50
|
+
course=courses[course_id], term=term
|
|
51
|
+
)
|
|
52
|
+
user_grades.append(grade)
|
|
53
|
+
|
|
54
|
+
return user_grades
|
|
@@ -1,9 +1,33 @@
|
|
|
1
|
+
from .api_documentation import (
|
|
2
|
+
APIMethodIndexItem,
|
|
3
|
+
APIMethodInfo,
|
|
4
|
+
APIModuleInfo,
|
|
5
|
+
Argument,
|
|
6
|
+
AuthOptions,
|
|
7
|
+
DeprecatedInfo,
|
|
8
|
+
ResultField,
|
|
9
|
+
ScopeInfo,
|
|
10
|
+
)
|
|
1
11
|
from .consumer import Consumer
|
|
2
|
-
from .course import
|
|
12
|
+
from .course import (
|
|
13
|
+
Course,
|
|
14
|
+
CourseAttribute,
|
|
15
|
+
CourseEdition,
|
|
16
|
+
CourseEditionConducted,
|
|
17
|
+
CourseUnit,
|
|
18
|
+
)
|
|
3
19
|
from .grade import Grade
|
|
4
20
|
from .group import Group
|
|
5
21
|
from .lang_dict import LangDict
|
|
6
22
|
from .programme import Programme, StudentProgramme
|
|
23
|
+
from .registration import (
|
|
24
|
+
CoursesCart,
|
|
25
|
+
Link,
|
|
26
|
+
Registration,
|
|
27
|
+
RegistrationCourse,
|
|
28
|
+
RegistrationRound,
|
|
29
|
+
Stage,
|
|
30
|
+
)
|
|
7
31
|
from .term import Term
|
|
8
32
|
from .user import (
|
|
9
33
|
EmailAccess,
|
|
@@ -50,4 +74,19 @@ __all__ = [
|
|
|
50
74
|
"CourseEditionConducted",
|
|
51
75
|
"Term",
|
|
52
76
|
"Consumer",
|
|
77
|
+
"CourseUnit",
|
|
78
|
+
"AuthOptions",
|
|
79
|
+
"Argument",
|
|
80
|
+
"ResultField",
|
|
81
|
+
"DeprecatedInfo",
|
|
82
|
+
"APIMethodInfo",
|
|
83
|
+
"APIMethodIndexItem",
|
|
84
|
+
"APIModuleInfo",
|
|
85
|
+
"ScopeInfo",
|
|
86
|
+
"Registration",
|
|
87
|
+
"RegistrationRound",
|
|
88
|
+
"RegistrationCourse",
|
|
89
|
+
"Stage",
|
|
90
|
+
"Link",
|
|
91
|
+
"CoursesCart",
|
|
53
92
|
]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AuthOptions(BaseModel):
|
|
7
|
+
consumer: str | None = None
|
|
8
|
+
token: str | None = None
|
|
9
|
+
administrative_only: bool | None = None
|
|
10
|
+
ssl_required: bool | None = None
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Argument(BaseModel):
|
|
14
|
+
name: str | None = None
|
|
15
|
+
is_required: bool | None = None
|
|
16
|
+
is_deprecated: bool | None = None
|
|
17
|
+
default_value: Any | None = None
|
|
18
|
+
description: str | None = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ResultField(BaseModel):
|
|
22
|
+
name: str | None = None
|
|
23
|
+
description: str | None = None
|
|
24
|
+
is_primary: bool | None = None
|
|
25
|
+
is_secondary: bool | None = None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DeprecatedInfo(BaseModel):
|
|
29
|
+
deprecated_by: str | None = None
|
|
30
|
+
present_until: str | None = None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class APIMethodInfo(BaseModel):
|
|
34
|
+
name: str | None = None
|
|
35
|
+
short_name: str | None = None
|
|
36
|
+
description: str | None = None
|
|
37
|
+
brief_description: str | None = None
|
|
38
|
+
ref_url: str | None = None
|
|
39
|
+
auth_options: AuthOptions | None = None
|
|
40
|
+
scopes: list[str] | None = None
|
|
41
|
+
arguments: list[Argument] | None = None
|
|
42
|
+
returns: str | None = None
|
|
43
|
+
errors: str | None = None
|
|
44
|
+
result_fields: list[ResultField] | None = None
|
|
45
|
+
beta: bool | None = None
|
|
46
|
+
deprecated: DeprecatedInfo | None = None
|
|
47
|
+
admin_access: bool | None = None
|
|
48
|
+
is_internal: bool | None = None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class APIMethodIndexItem(BaseModel):
|
|
52
|
+
name: str | None = None
|
|
53
|
+
brief_description: str | None = None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class APIModuleInfo(BaseModel):
|
|
57
|
+
name: str | None = None
|
|
58
|
+
title: str | None = None
|
|
59
|
+
brief_description: str | None = None
|
|
60
|
+
description: str | None = None
|
|
61
|
+
submodules: list[str] | None = None
|
|
62
|
+
methods: list[str] | None = None
|
|
63
|
+
beta: bool | None = None
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class ScopeInfo(BaseModel):
|
|
67
|
+
key: str | None = None
|
|
68
|
+
developers_description: str | None = None
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from typing import List
|
|
3
2
|
|
|
4
3
|
from pydantic import BaseModel
|
|
5
4
|
|
|
@@ -13,5 +12,5 @@ class Consumer(BaseModel):
|
|
|
13
12
|
url: str | None = None
|
|
14
13
|
email: str | None = None
|
|
15
14
|
date_registered: datetime | None = None
|
|
16
|
-
administrative_methods:
|
|
17
|
-
token_scopes:
|
|
15
|
+
administrative_methods: list[str] | None = None
|
|
16
|
+
token_scopes: list[str] | None = None
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING,
|
|
1
|
+
from typing import TYPE_CHECKING, Optional
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel
|
|
4
4
|
|
|
@@ -6,9 +6,8 @@ from .group import Group
|
|
|
6
6
|
from .term import Term
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
|
-
|
|
9
|
+
pass
|
|
10
10
|
|
|
11
|
-
from .grade import Grade
|
|
12
11
|
from .lang_dict import LangDict
|
|
13
12
|
|
|
14
13
|
|
|
@@ -18,7 +17,7 @@ class CourseAttribute(BaseModel):
|
|
|
18
17
|
"""
|
|
19
18
|
|
|
20
19
|
name: LangDict | None = None
|
|
21
|
-
values:
|
|
20
|
+
values: list[LangDict] | None = None
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
class Course(BaseModel):
|
|
@@ -31,7 +30,7 @@ class Course(BaseModel):
|
|
|
31
30
|
homepage_url: str | None = None
|
|
32
31
|
profile_url: str | None = None
|
|
33
32
|
is_currently_conducted: bool | None = None
|
|
34
|
-
terms:
|
|
33
|
+
terms: list[Term] | None = None
|
|
35
34
|
fac_id: str | None = None
|
|
36
35
|
lang_id: str | None = None
|
|
37
36
|
ects_credits_simplified: float | None = None
|
|
@@ -40,8 +39,25 @@ class Course(BaseModel):
|
|
|
40
39
|
learning_outcomes: LangDict | None = None
|
|
41
40
|
assessment_criteria: LangDict | None = None
|
|
42
41
|
practical_placement: LangDict | None = None
|
|
43
|
-
attributes:
|
|
44
|
-
attributes2:
|
|
42
|
+
attributes: list[CourseAttribute] | None = None
|
|
43
|
+
attributes2: list[CourseAttribute] | None = None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class CourseUnit(BaseModel):
|
|
47
|
+
"""
|
|
48
|
+
Class representing a course unit.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
id: str
|
|
52
|
+
homepage_url: str | None = None
|
|
53
|
+
profile_url: str | None = None
|
|
54
|
+
learning_outcomes: LangDict | None = None
|
|
55
|
+
assessment_criteria: LangDict | None = None
|
|
56
|
+
topics: LangDict | None = None
|
|
57
|
+
teaching_methods: LangDict | None = None
|
|
58
|
+
bibliography: LangDict | None = None
|
|
59
|
+
course_edition: Optional["CourseEdition"] = None
|
|
60
|
+
class_groups: list[Group] | None = None
|
|
45
61
|
|
|
46
62
|
|
|
47
63
|
class CourseEdition(BaseModel):
|
|
@@ -49,22 +65,13 @@ class CourseEdition(BaseModel):
|
|
|
49
65
|
Class representing a course edition.
|
|
50
66
|
"""
|
|
51
67
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
term_id: str | None = None
|
|
68
|
+
course: Course | None = None
|
|
69
|
+
term: Term | None = None
|
|
55
70
|
homepage_url: str | None = None
|
|
56
|
-
profile_url: str | None = None
|
|
57
|
-
coordinators: List["User"] | None = None
|
|
58
|
-
lecturers: List["User"] | None = None
|
|
59
|
-
passing_status: str | None = None
|
|
60
|
-
user_groups: List[Group] | None = None
|
|
61
71
|
description: LangDict | None = None
|
|
62
72
|
bibliography: LangDict | None = None
|
|
63
73
|
notes: LangDict | None = None
|
|
64
|
-
|
|
65
|
-
participants: List["User"] | None = None
|
|
66
|
-
grades: List[Grade] | None = None
|
|
67
|
-
attributes: List[CourseAttribute] | None = None
|
|
74
|
+
course_units: list[CourseUnit] | None = None
|
|
68
75
|
|
|
69
76
|
|
|
70
77
|
class CourseEditionConducted(BaseModel):
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import TYPE_CHECKING, Any, Optional
|
|
3
|
+
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
|
|
6
|
+
from . import CourseEdition
|
|
7
|
+
from .course import CourseUnit
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from .user import User
|
|
11
|
+
|
|
12
|
+
from .lang_dict import LangDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Grade(BaseModel):
|
|
16
|
+
value: float | None = None
|
|
17
|
+
value_symbol: str | None = None
|
|
18
|
+
passes: bool | None = None
|
|
19
|
+
value_description: LangDict | None = None
|
|
20
|
+
exam_id: int | None = None
|
|
21
|
+
exam_session_number: int | None = None
|
|
22
|
+
counts_into_average: bool | None = None
|
|
23
|
+
comment: str | None = None
|
|
24
|
+
private_comment: str | None = None
|
|
25
|
+
grade_type_id: str | None = None
|
|
26
|
+
date_modified: datetime | None = None
|
|
27
|
+
date_acquisition: datetime | None = None
|
|
28
|
+
modification_author: str | None = None
|
|
29
|
+
course_edition: CourseEdition | None = None
|
|
30
|
+
unit: CourseUnit | None = None
|
|
31
|
+
exam_report: dict[str, Any] | None = None
|
|
32
|
+
user: Optional["User"] = None
|
|
33
|
+
weight: float | None = (
|
|
34
|
+
None # Not returned by USOS API but is here to make it easier to work with grades
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
def __init__(self, **data: Any):
|
|
38
|
+
super().__init__(**data)
|
|
39
|
+
if self.value_symbol:
|
|
40
|
+
try:
|
|
41
|
+
self.value = float(self.value_symbol.replace(",", "."))
|
|
42
|
+
except ValueError:
|
|
43
|
+
pass # Invalid value, ignore it
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel
|
|
4
4
|
|
|
@@ -22,8 +22,8 @@ class Group(BaseModel):
|
|
|
22
22
|
course_fac_id: str | None = None
|
|
23
23
|
course_lang_id: str | None = None
|
|
24
24
|
term_id: str | None = None
|
|
25
|
-
lecturers:
|
|
26
|
-
participants:
|
|
25
|
+
lecturers: list["User"] | None = None
|
|
26
|
+
participants: list["User"] | None = None
|
|
27
27
|
group_description: LangDict | None = None
|
|
28
28
|
group_literature: LangDict | None = None
|
|
29
29
|
course_learning_outcomes: LangDict | None = None
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
|
|
5
|
+
from usos_api.models import LangDict
|
|
6
|
+
from usos_api.models.course import Course
|
|
7
|
+
from usos_api.models.programme import Programme
|
|
8
|
+
from usos_api.models.term import Term
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Registration(BaseModel):
|
|
12
|
+
id: str | None = None
|
|
13
|
+
description: LangDict | None = None
|
|
14
|
+
message: LangDict | None = None
|
|
15
|
+
type: str | None = None
|
|
16
|
+
status: str | None = None
|
|
17
|
+
faculty: str | None = None
|
|
18
|
+
is_linkage_required: bool | None = None
|
|
19
|
+
www_instance: str | None = None
|
|
20
|
+
|
|
21
|
+
rounds: list["RegistrationRound"] | None = None
|
|
22
|
+
related_courses: list["RegistrationCourse"] | None = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class RegistrationRound(BaseModel):
|
|
26
|
+
id: str | None = None
|
|
27
|
+
name: LangDict | None = None
|
|
28
|
+
status: str | None = None
|
|
29
|
+
registration_mode: str | None = None
|
|
30
|
+
start_date: datetime | None = None
|
|
31
|
+
end_date: datetime | None = None
|
|
32
|
+
selection_limit: int | None = None
|
|
33
|
+
is_dedicated: bool | None = None
|
|
34
|
+
is_overflow_allowed: bool | None = None
|
|
35
|
+
is_exchange: bool | None = None
|
|
36
|
+
is_only_entitled: bool | None = None
|
|
37
|
+
rank_code: str | None = None
|
|
38
|
+
ranking: dict | None = None
|
|
39
|
+
is_processed: bool | None = None
|
|
40
|
+
registration: Registration | None = None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class RegistrationCourse(BaseModel):
|
|
44
|
+
registration_id: str | None = None
|
|
45
|
+
course_id: str | None = None
|
|
46
|
+
term_id: str | None = None
|
|
47
|
+
status: str | None = None
|
|
48
|
+
limits: dict | None = None
|
|
49
|
+
www_instance: str | None = None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class Stage(BaseModel):
|
|
53
|
+
id: str | None = None
|
|
54
|
+
name: LangDict | None = None
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class Link(BaseModel):
|
|
58
|
+
programme: Programme | None = None
|
|
59
|
+
stage: Stage | None = None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class CoursesCart(BaseModel):
|
|
63
|
+
links: list[Link] | None = None
|
|
64
|
+
course: Course | None = None
|
|
65
|
+
term: Term | None = None
|
|
66
|
+
user_registration_status: str | None = None
|
|
67
|
+
is_registration_valid: bool | None = None
|
|
68
|
+
choice_number: int | None = None
|
|
69
|
+
limits: int | None = None
|
|
70
|
+
is_linkage_required: bool | None = None
|
|
71
|
+
registrations_count: int | None = None
|
|
72
|
+
registration_status: str | None = None
|
|
73
|
+
active_registration_round_id: str | None = None
|
|
@@ -12,3 +12,10 @@ class Term(BaseModel):
|
|
|
12
12
|
end_date: date | None = None
|
|
13
13
|
finish_date: date | None = None
|
|
14
14
|
is_active: bool | None = None
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def is_current(self) -> bool:
|
|
18
|
+
"""
|
|
19
|
+
Check if the term is currently active.
|
|
20
|
+
"""
|
|
21
|
+
return self.is_active and self.start_date <= date.today() <= self.finish_date
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from .api_documentation import APIDocumentationService
|
|
2
|
+
from .api_server import APIServerService
|
|
3
|
+
from .courses import CourseService
|
|
4
|
+
from .grades import GradeService
|
|
5
|
+
from .groups import GroupService
|
|
6
|
+
from .registrations import RegistrationService
|
|
7
|
+
from .terms import TermService
|
|
8
|
+
from .users import UserService
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"APIDocumentationService",
|
|
12
|
+
"APIServerService",
|
|
13
|
+
"CourseService",
|
|
14
|
+
"GradeService",
|
|
15
|
+
"GroupService",
|
|
16
|
+
"TermService",
|
|
17
|
+
"UserService",
|
|
18
|
+
"RegistrationService",
|
|
19
|
+
]
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from usos_api.models.api_documentation import (
|
|
2
|
+
APIMethodIndexItem,
|
|
3
|
+
APIMethodInfo,
|
|
4
|
+
APIModuleInfo,
|
|
5
|
+
ScopeInfo,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class APIDocumentationService:
|
|
10
|
+
"""
|
|
11
|
+
A service for API documentation fetching.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, connection):
|
|
15
|
+
"""
|
|
16
|
+
Initialize the API documentation service.
|
|
17
|
+
|
|
18
|
+
:param connection: The connection to use.
|
|
19
|
+
"""
|
|
20
|
+
self.connection = connection
|
|
21
|
+
|
|
22
|
+
async def get_method_info(
|
|
23
|
+
self, method: str, fields: list[str] | None = None
|
|
24
|
+
) -> APIMethodInfo:
|
|
25
|
+
"""
|
|
26
|
+
Get information about a specific method.
|
|
27
|
+
|
|
28
|
+
:param method: The method to get information about.
|
|
29
|
+
:param fields: The fields to include in the response.
|
|
30
|
+
:return: Object representing the method.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
if not method.startswith("services/"):
|
|
34
|
+
method = f"services/{method}"
|
|
35
|
+
|
|
36
|
+
response = await self.connection.post(
|
|
37
|
+
"services/apiref/method", name=method, fields=fields
|
|
38
|
+
)
|
|
39
|
+
return APIMethodInfo(**response)
|
|
40
|
+
|
|
41
|
+
async def get_method_index(self) -> list[APIMethodIndexItem]:
|
|
42
|
+
"""
|
|
43
|
+
Get a list of API methods with brief descriptions.
|
|
44
|
+
:return: List of objects representing the methods.
|
|
45
|
+
"""
|
|
46
|
+
response = await self.connection.post("services/apiref/method_index")
|
|
47
|
+
return [APIMethodIndexItem(**item) for item in response]
|
|
48
|
+
|
|
49
|
+
async def get_module_info(self, module_name: str) -> APIModuleInfo:
|
|
50
|
+
"""
|
|
51
|
+
Get information about a specific module.
|
|
52
|
+
|
|
53
|
+
:param module_name: The name of the module.
|
|
54
|
+
:return: Object representing the module.
|
|
55
|
+
"""
|
|
56
|
+
if not module_name.startswith("services/"):
|
|
57
|
+
module_name = f"services/{module_name}"
|
|
58
|
+
response = await self.connection.post(
|
|
59
|
+
"services/apiref/module", name=module_name
|
|
60
|
+
)
|
|
61
|
+
return APIModuleInfo(**response)
|
|
62
|
+
|
|
63
|
+
async def get_scopes(self) -> list[ScopeInfo]:
|
|
64
|
+
"""
|
|
65
|
+
Get a list of all scopes available in the USOS API installation.
|
|
66
|
+
:return: List of scope information objects.
|
|
67
|
+
"""
|
|
68
|
+
response = await self.connection.post("services/apiref/scopes")
|
|
69
|
+
return [ScopeInfo(**scope) for scope in response]
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
1
|
from usos_api.models.consumer import Consumer
|
|
4
2
|
|
|
5
3
|
|
|
@@ -16,7 +14,7 @@ class APIServerService:
|
|
|
16
14
|
"""
|
|
17
15
|
self.connection = connection
|
|
18
16
|
|
|
19
|
-
async def get_consumer_info(self, fields:
|
|
17
|
+
async def get_consumer_info(self, fields: list[str] | None = None) -> Consumer:
|
|
20
18
|
"""
|
|
21
19
|
Get information on the Consumer.
|
|
22
20
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from ..connection import USOSAPIConnection
|
|
4
|
+
from ..models import Course
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CourseService:
|
|
8
|
+
"""
|
|
9
|
+
A service for course-related operations.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, connection: USOSAPIConnection):
|
|
13
|
+
"""
|
|
14
|
+
Initialize the course service.
|
|
15
|
+
|
|
16
|
+
:param connection: The connection to use.
|
|
17
|
+
"""
|
|
18
|
+
self.connection = connection
|
|
19
|
+
|
|
20
|
+
async def get_user_courses_ects(self) -> dict[str, dict[str, float]]:
|
|
21
|
+
"""
|
|
22
|
+
Get user courses ECTS.
|
|
23
|
+
|
|
24
|
+
:return: The user courses ECTS.
|
|
25
|
+
"""
|
|
26
|
+
response = await self.connection.post("services/courses/user_ects_points")
|
|
27
|
+
return {
|
|
28
|
+
term: {course: float(points) for course, points in courses.items()}
|
|
29
|
+
for term, courses in response.items()
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async def get_courses(
|
|
33
|
+
self, course_ids: list[str], fields: Optional[list[str]] = None
|
|
34
|
+
) -> list[Course]:
|
|
35
|
+
"""
|
|
36
|
+
Get courses by their IDs.
|
|
37
|
+
|
|
38
|
+
:param course_ids: The IDs of the courses to get.
|
|
39
|
+
:param fields: The fields to include in the response.
|
|
40
|
+
:return: A list of courses.
|
|
41
|
+
"""
|
|
42
|
+
if not course_ids:
|
|
43
|
+
return []
|
|
44
|
+
|
|
45
|
+
course_ids_str = "|".join(course_ids)
|
|
46
|
+
fields_str = "|".join(fields) if fields else "id|name"
|
|
47
|
+
|
|
48
|
+
response = await self.connection.post(
|
|
49
|
+
"services/courses/courses", course_ids=course_ids_str, fields=fields_str
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
return [Course(**course_data) for course_data in response.values()]
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from ..connection import USOSAPIConnection
|
|
2
|
+
from ..models import Grade
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class GradeService:
|
|
6
|
+
"""
|
|
7
|
+
A service for grade-related operations.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
def __init__(self, connection: USOSAPIConnection):
|
|
11
|
+
"""
|
|
12
|
+
Initialize the grade service.
|
|
13
|
+
|
|
14
|
+
:param connection: The connection to use.
|
|
15
|
+
"""
|
|
16
|
+
self.connection = connection
|
|
17
|
+
|
|
18
|
+
async def get_grades_by_terms(
|
|
19
|
+
self, term_ids: list[str] | str, fields: list[str] = None
|
|
20
|
+
) -> dict[str, dict[str, dict[str, dict[str, Grade] | list[Grade]]]]:
|
|
21
|
+
"""
|
|
22
|
+
Get grades by terms.
|
|
23
|
+
|
|
24
|
+
:param term_ids: The IDs of the terms to get grades for, or a single term ID.
|
|
25
|
+
:param fields: The fields to include in the response.
|
|
26
|
+
:return: The grades.
|
|
27
|
+
"""
|
|
28
|
+
term_ids = [term_ids] if isinstance(term_ids, str) else term_ids
|
|
29
|
+
fields = fields or [
|
|
30
|
+
"value_symbol",
|
|
31
|
+
"passes",
|
|
32
|
+
"value_description",
|
|
33
|
+
"exam_id",
|
|
34
|
+
"exam_session_number",
|
|
35
|
+
"counts_into_average",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
response = await self.connection.post(
|
|
39
|
+
"services/grades/terms2",
|
|
40
|
+
term_ids="|".join(term_ids),
|
|
41
|
+
fields="|".join(fields),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
new_response = {}
|
|
45
|
+
term_id: str
|
|
46
|
+
for term_id, courses in response.items():
|
|
47
|
+
new_response[term_id] = self._process_courses(courses)
|
|
48
|
+
|
|
49
|
+
return new_response
|
|
50
|
+
|
|
51
|
+
def _process_courses(
|
|
52
|
+
self, courses: dict
|
|
53
|
+
) -> dict[str, dict[str, dict[str, Grade] | list[Grade]]]:
|
|
54
|
+
"""
|
|
55
|
+
Process courses to extract grades.
|
|
56
|
+
|
|
57
|
+
:param courses: The courses to process.
|
|
58
|
+
:return: The processed courses with grades.
|
|
59
|
+
"""
|
|
60
|
+
processed_courses = {}
|
|
61
|
+
for course_id, grades in courses.items():
|
|
62
|
+
course_units_grades = self._process_course_units_grades(
|
|
63
|
+
grades["course_units_grades"]
|
|
64
|
+
)
|
|
65
|
+
course_grades = self._process_course_grades(grades["course_grades"])
|
|
66
|
+
processed_courses[course_id] = {
|
|
67
|
+
"course_units_grades": course_units_grades,
|
|
68
|
+
"course_grades": course_grades,
|
|
69
|
+
}
|
|
70
|
+
return processed_courses
|
|
71
|
+
|
|
72
|
+
def _process_course_units_grades(
|
|
73
|
+
self, course_units_grades: dict
|
|
74
|
+
) -> dict[str, dict[str, Grade]]:
|
|
75
|
+
"""
|
|
76
|
+
Process course units grades.
|
|
77
|
+
|
|
78
|
+
:param course_units_grades: The course units grades to process.
|
|
79
|
+
:return: The processed course units grades.
|
|
80
|
+
"""
|
|
81
|
+
processed_units_grades = {}
|
|
82
|
+
for unit_id, units in course_units_grades.items():
|
|
83
|
+
processed_units_grades[unit_id] = {
|
|
84
|
+
exam_session_number: Grade(**grade)
|
|
85
|
+
for unit in units
|
|
86
|
+
for exam_session_number, grade in unit.items()
|
|
87
|
+
}
|
|
88
|
+
return processed_units_grades
|
|
89
|
+
|
|
90
|
+
def _process_course_grades(self, course_grades: list) -> list[Grade]:
|
|
91
|
+
"""
|
|
92
|
+
Process course grades.
|
|
93
|
+
|
|
94
|
+
:param course_grades: The course grades to process.
|
|
95
|
+
:return: The processed course grades.
|
|
96
|
+
"""
|
|
97
|
+
return [
|
|
98
|
+
Grade(**grade) for session in course_grades for grade in session.values()
|
|
99
|
+
]
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from datetime import datetime
|
|
2
|
-
|
|
3
1
|
from ..connection import USOSAPIConnection
|
|
4
2
|
from ..logger import get_logger
|
|
5
3
|
from ..models import Group, Term
|
|
@@ -12,11 +10,7 @@ def _filter_ongoing_terms(terms: list[Term]) -> list[Term]:
|
|
|
12
10
|
:param terms: The terms to filter.
|
|
13
11
|
:return: The ongoing terms.
|
|
14
12
|
"""
|
|
15
|
-
return [
|
|
16
|
-
term
|
|
17
|
-
for term in terms
|
|
18
|
-
if term.start_date <= datetime.today().date() <= term.finish_date
|
|
19
|
-
]
|
|
13
|
+
return [term for term in terms if term.is_current]
|
|
20
14
|
|
|
21
15
|
|
|
22
16
|
def _deserialize_term(data: dict) -> Term:
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
from ..connection import USOSAPIConnection
|
|
2
|
+
from ..models import CoursesCart, Registration
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class RegistrationService:
|
|
6
|
+
"""
|
|
7
|
+
A service for registration-related operations.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
def __init__(self, connection: USOSAPIConnection):
|
|
11
|
+
"""
|
|
12
|
+
Initialize the registration service.
|
|
13
|
+
|
|
14
|
+
:param connection: The connection to use.
|
|
15
|
+
"""
|
|
16
|
+
self.connection = connection
|
|
17
|
+
|
|
18
|
+
async def get_user_registrations(
|
|
19
|
+
self, active_only: bool = True, fields: list[str] = None
|
|
20
|
+
) -> list[Registration]:
|
|
21
|
+
"""
|
|
22
|
+
Get user registrations.
|
|
23
|
+
|
|
24
|
+
:param active_only: Whether to return only active registrations.
|
|
25
|
+
:param fields: Selector of result fields you are interested in (optional, default is specified fields).
|
|
26
|
+
:return: The user registrations.
|
|
27
|
+
"""
|
|
28
|
+
fields = "|".join(fields) if fields else None
|
|
29
|
+
|
|
30
|
+
response = await self.connection.post(
|
|
31
|
+
"services/registrations/user_registrations",
|
|
32
|
+
fields=fields,
|
|
33
|
+
active_only=active_only,
|
|
34
|
+
)
|
|
35
|
+
return [Registration(**registration) for registration in response]
|
|
36
|
+
|
|
37
|
+
async def get_registration(
|
|
38
|
+
self, registration_id: str, fields: list[str] = None
|
|
39
|
+
) -> Registration:
|
|
40
|
+
"""
|
|
41
|
+
Get a registration.
|
|
42
|
+
|
|
43
|
+
:param registration_id: The ID of the registration.
|
|
44
|
+
:param fields: Selector of result fields you are interested in (optional, default is specified fields).
|
|
45
|
+
:return: The registration.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
fields = "|".join(fields) if fields else None
|
|
49
|
+
|
|
50
|
+
response = await self.connection.post(
|
|
51
|
+
"services/registrations/registration", id=registration_id, fields=fields
|
|
52
|
+
)
|
|
53
|
+
return Registration(**response)
|
|
54
|
+
|
|
55
|
+
async def register_to_course(
|
|
56
|
+
self,
|
|
57
|
+
round_id: str,
|
|
58
|
+
course_id: str,
|
|
59
|
+
term_id: str,
|
|
60
|
+
user_programme_id: str = None,
|
|
61
|
+
user_stage_id: str = None,
|
|
62
|
+
) -> dict:
|
|
63
|
+
"""
|
|
64
|
+
Register to a course.
|
|
65
|
+
|
|
66
|
+
:param round_id: Registration round ID.
|
|
67
|
+
:param course_id: Course code.
|
|
68
|
+
:param term_id: Cycle code.
|
|
69
|
+
:param user_programme_id: User program ID (optional).
|
|
70
|
+
:param user_stage_id: User stage ID (optional).
|
|
71
|
+
:return: Empty dict on success.
|
|
72
|
+
"""
|
|
73
|
+
data = {
|
|
74
|
+
"round_id": round_id,
|
|
75
|
+
"course_id": course_id,
|
|
76
|
+
"term_id": term_id,
|
|
77
|
+
}
|
|
78
|
+
if user_programme_id:
|
|
79
|
+
data["user_programme_id"] = user_programme_id
|
|
80
|
+
if user_stage_id:
|
|
81
|
+
data["user_stage_id"] = user_stage_id
|
|
82
|
+
|
|
83
|
+
response = await self.connection.post("services/registrations/register", **data)
|
|
84
|
+
return response
|
|
85
|
+
|
|
86
|
+
async def get_courses_cart(self, fields: list[str] = None) -> list[CoursesCart]:
|
|
87
|
+
"""
|
|
88
|
+
Get user courses cart with registrations information.
|
|
89
|
+
|
|
90
|
+
:param fields: Selector of result fields you are interested in (optional, default is specified fields).
|
|
91
|
+
:return: A CoursesCartResponse object.
|
|
92
|
+
"""
|
|
93
|
+
if fields is None:
|
|
94
|
+
fields = [
|
|
95
|
+
"links",
|
|
96
|
+
"course",
|
|
97
|
+
"term",
|
|
98
|
+
"user_registration_status",
|
|
99
|
+
"is_registration_valid",
|
|
100
|
+
"choice_number",
|
|
101
|
+
"limits",
|
|
102
|
+
"is_linkage_required",
|
|
103
|
+
"registrations_count",
|
|
104
|
+
"registration_status",
|
|
105
|
+
"active_registration_round_id",
|
|
106
|
+
]
|
|
107
|
+
fields = "|".join(fields)
|
|
108
|
+
|
|
109
|
+
response = await self.connection.post(
|
|
110
|
+
"services/registrations/courses_cart", fields=fields
|
|
111
|
+
)
|
|
112
|
+
return [CoursesCart(**course) for course in response]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from ..connection import USOSAPIConnection
|
|
2
|
+
from ..models import Term
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class TermService:
|
|
6
|
+
"""
|
|
7
|
+
A service for term-related operations.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
def __init__(self, connection: USOSAPIConnection):
|
|
11
|
+
"""
|
|
12
|
+
Initialize the term service.
|
|
13
|
+
|
|
14
|
+
:param connection: The connection to use.
|
|
15
|
+
"""
|
|
16
|
+
self.connection = connection
|
|
17
|
+
|
|
18
|
+
async def get_term(self, term_id: str) -> Term:
|
|
19
|
+
"""
|
|
20
|
+
Get a term by its ID.
|
|
21
|
+
|
|
22
|
+
:param term_id: The ID of the term to get.
|
|
23
|
+
:return: The term.
|
|
24
|
+
"""
|
|
25
|
+
response = await self.connection.post("services/terms/term", term_id=term_id)
|
|
26
|
+
return Term(**response)
|
|
27
|
+
|
|
28
|
+
async def get_terms(self, term_ids: list[str]) -> list[Term]:
|
|
29
|
+
"""
|
|
30
|
+
Get terms by their IDs.
|
|
31
|
+
|
|
32
|
+
:param term_ids: The IDs of the terms to get, or a single term ID.
|
|
33
|
+
:return: The terms.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
term_ids = "|".join(term_ids)
|
|
37
|
+
|
|
38
|
+
response = await self.connection.post("services/terms/terms", term_ids=term_ids)
|
|
39
|
+
return [Term(**term) for term in response.values()]
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, Optional
|
|
2
|
-
|
|
3
|
-
from pydantic import BaseModel
|
|
4
|
-
|
|
5
|
-
if TYPE_CHECKING:
|
|
6
|
-
from .user import User
|
|
7
|
-
|
|
8
|
-
from .lang_dict import LangDict
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class Grade(BaseModel):
|
|
12
|
-
value_symbol: str | None = None
|
|
13
|
-
passes: bool | None = None
|
|
14
|
-
value_description: LangDict | None = None
|
|
15
|
-
exam_id: str | None = None
|
|
16
|
-
exam_session_number: str | None = None
|
|
17
|
-
counts_into_average: bool | None = None
|
|
18
|
-
comment: str | None = None
|
|
19
|
-
private_comment: str | None = None
|
|
20
|
-
grade_type_id: str | None = None
|
|
21
|
-
date_modified: str | None = None
|
|
22
|
-
date_acquisition: str | None = None
|
|
23
|
-
modification_author: str | None = None
|
|
24
|
-
course_edition: Dict[str, Any] | None = None
|
|
25
|
-
unit: Dict[str, Any] | None = None
|
|
26
|
-
exam_report: Dict[str, Any] | None = None
|
|
27
|
-
user: Optional["User"] = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|