Full API documentation¶
Client¶
-
class
vulcan.
Vulcan
(certificate, logging_level=None)¶ Logs in to the e-register using generated certificate
Parametry: certificate ( dict
) – Generated certificate usingvulcan.Vulcan.register()
-
dictionaries
¶ Dictionaries, that include i.a. teachers
Type: vulcan._dictionaries.Dictionaries
-
get_exams
(date=None)¶ Fetches exams from the given date
Parametry: date ( datetime.date
) – Date, from which to fetch exams, if not provided it’s using the today dateYields: vulcan._exam.Exam
-
get_grades
()¶ Fetches student grades
Yields: vulcan._grade.Grade
-
get_homework
(date=None)¶ Fetches homework from the given date
Parametry: date ( datetime.date
) – Date, from which to fetch exams, if not provided it’s using the today dateYields: vulcan._homework.Homework
-
get_lessons
(date=None)¶ Fetches lessons from the given date
Parametry: date ( datetime.date
) – Date, from which to fetch lessons, if not provided it’s using the today dateYields: vulcan._lesson.Lesson
-
get_messages
(date_from=None, date_to=None)¶ Fetches messages from the given date
Parametry: - date_from (
datetime.date
) – Date, from which to fetch messages, if not provided it’s using the semester (period) start date - date_to (
datetime.date
) – Date, to which to fetch messages, if not provided it’s using the semester (period) end date
Yields: - date_from (
-
get_students
()¶ Yields students that are assigned to the account
Yields: vulcan._student.Student
-
static
register
(token, symbol, pin)¶ Registers API as a new mobile device
Parametry: - token (
str
) – Token - symbol (
str
) – Symbol - pin (
str
) – PIN code
Zwraca: Generated certificate, use json property to save it to a file
Typ zwracany: - token (
-
static
set_logging_level
(logging_level)¶ Sets the default logging level
Parametry: logging_level ( int
) – Logging level from :module:`logging` module
-
set_student
(student)¶ Sets the default student
Parametry: student ( vulcan._student.Student
) – Student fromvulcan.Vulcan.get_students()
-
Models¶
-
class
vulcan._lesson.
Lesson
(number, room=None, group=None, date=None, time=None, teacher=None, subject=None)¶ -
number
¶ Lesson number
Type: int
-
room
¶ Classroom, in which is the lesson
Type: string
-
group
¶ Group, that has the lesson
Type: string
-
date
¶ Lesson date
Type: datetime.date
-
from_
¶ Lesson start date and time
Type: datetime.datetime
-
to
¶ Lesson end date and time
Type: datetime.datetime
-
time
¶ Information about the lesson time
Type: vulcan._lesson.LessonTime
-
teacher
¶ Teacher of the lesson
Type: vulcan._teacher.Teacher
-
subject
¶ Subject on the lesson
Type: vulcan._subject.Subject
-
-
class
vulcan._class.
Class
(id, level, name=None, symbol=None)¶ -
id
¶ Class ID
Type: int
-
level
¶ Class level (eg. 8)
Type: int
-
name
¶ Class name (eg. „8A”)
Type: str
-
symbol
¶ Class symbol (eg. „A”)
Type: str
-
-
class
vulcan._grade.
Grade
(id, content, weight, description, date, last_modification_date, value=None, teacher=None, subject=None, category=None)¶ -
id
¶ Grade ID
Type: int
-
content
¶ Grade content
Type: str
-
weight
¶ Grade weight
Type: float
-
description
¶ Grade description
Type: str
-
date
¶ Grade creation date
Type: datetime.datetime
-
last_modification_date
¶ Last grade modification date
Type: datetime.datetime
-
value
¶ Grade value (you can use it to calculate the average)
Type: float
-
teacher
¶ Teacher, who added the grade
Type: vulcan._teacher.Teacher
-
subject
¶ Subject, from which student received the grade
Type: vulcan._subject.Subject
-
category
¶ Grade category
Type: vulcan._grade.GradeCategory
-
-
class
vulcan._grade.
GradeCategory
(id, name, short)¶ Grade category
-
name
¶ Full category name
Type: str
-
short
¶ Short name of the category
Type: str
-
-
class
vulcan._period.
Period
(id, number, level, from_=None, to=None)¶ School year period
-
id
¶ Period ID
Type: int
-
number
¶ Number of the period
Type: int
-
level
¶ Level (class level) of the period
Type: int
-
from_
¶ Period start date
Type: datetime.date
-
to
¶ Period end date
Type: datetime.date
-
-
class
vulcan._teacher.
Teacher
(id, first_name, last_name, short, login_id)¶ School teacher or employee
-
id
¶ Teacher ID
Type: int
-
first_name
¶ Teacher first name
Type: str
-
last_name
¶ Teacher last name (surname)
Type: str
-
name
¶ Teacher full name
Type: str
-
short
¶ Code (short name) of the teacher
Type: str
-
login_id
¶ Teacher account ID
Type: int
-
-
class
vulcan._subject.
Subject
(id, name, short, position)¶ School subject
-
id
¶ Subject ID
Type: int
-
name
¶ Subject full name
Type: str
-
short
¶ Short name of the subject
Type: str
-
position
¶ Type: int
-
-
class
vulcan._lesson.
LessonTime
(id, number, from_, to)¶ Lesson time
-
id
¶ Lesson time ID
Type: int
-
number
¶ Lesson number
Type: int
-
from_
¶ Lesson start time
Type: datetime.time
-
to
¶ Lesson end time
Type: datetime.time
-
-
class
vulcan._exam.
Exam
(id, type, description, date, teacher=None, subject=None)¶ Exam, test, short test or class test
-
id
¶ Exam ID
Type: int
-
type
¶ Exam type
Type: vulcan._exam.ExamType
-
description
¶ Exam description
Type: str
-
date
¶ Exam date
Type: datetime.date
-
teacher
¶ Teacher, who added the exam
Type: vulcan._teacher.Teacher
-
subject
¶ Subject, from which is the exam
Type: vulcan._subject.Subject
-
-
class
vulcan._homework.
Homework
(id, description, date, teacher=None, subject=None)¶ -
id
¶ Homework ID
Type: int
-
description
¶ Homework description
Type: str
-
date
¶ Homework deadline date
Type: datetime.date
-
teacher
¶ Teacher, who added the homework
Type: vulcan._teacher.Teacher
-
subject
¶ Subject, from which is the homework
Type: vulcan._subject.Subject
-
-
class
vulcan._school.
School
(id, name, short, symbol)¶ -
id
¶ Type: int
-
name
¶ Type: str
-
short
¶ Type: str
-
symbol
¶ Type: str
-
-
class
vulcan._student.
Student
(id, login_id, first_name, second_name, last_name, gender, nickname=None, period=None, class_=None, school=None)¶ -
id
¶ Student ID
Type: int
-
login_id
¶ Type: int
-
first_name
¶ Student first name
Type: str
-
second_name
¶ Student second name
Type: str
orNone
-
last_name
¶ Student last name (surname)
Type: str
-
name
¶ Student full name
Type: str
-
gender
¶ Student gender
Type: vulcan._student.Gender
-
nickname
¶ Student nickname
Type: str
-
period
¶ Current student class period
Type: vulcan._period.Period
-
class_
¶ Student class
Type: vulcan._class.Class
-
school
¶ Student school
Type: vulcan._school.School
-
-
class
vulcan._certificate.
Certificate
(pfx, key, key_formatted, base_url)¶
-
class
vulcan._message.
Message
(id, sender_id, recipients, title, content, sent_date, sent_time, read_date=None, read_time=None, sender=None)¶ -
id
¶ Message ID
Type: int
-
sender_id
¶ Type: int
) Message sender’s (teacher
-
recipients
¶ Type: list
-
title
¶ Type: str
) Title (subject
-
content
¶ Type: str
-
sender
¶ Type: vulcan._teacher.Teacher
) Sender of the message (teacher
-
sent_date
¶ Type: datetime.datetime
-
sent_time
¶ Type: datetime.time
-
sent_datetime
¶ Date with time when the message was sent
Type: datetime.date
-
read_date
¶ Type: datetime.datetime
-
read_time
¶ Type: datetime.time
-
read_datetime
¶ Date with time when the message was read
Type: datetime.date
-
is_read
¶ Type: bool
-
-
class
vulcan._message.
MessageRecipient
(login_id, name)¶
-
class
vulcan._dictionaries.
Dictionaries
(teachers_json, subjects_json, lesson_times_json, grade_categories_json, notice_categories_json, attendance_categories_json, attendance_types_json)¶ -
grade_categories
¶ List of grade categories
Type: list( vulcan._grade.GradeCategory
)
-
lesson_times
¶ List of lesson times
Type: list( vulcan._lesson.LessonTime
)
-
subjects
¶ List of subjects
Type: list( vulcan._subject.Subject
)
-
teachers
¶ List of teachers
Type: list( vulcan._teacher.Teacher
)
-