Skip to content

a lib for automatization work with dnevnik

Notifications You must be signed in to change notification settings

synaxAIO/dnevniklib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DnevnikLib

GitHub release (latest by date) PyPI - Downloads GitHub Repo stars PyPI

Open Source and exclusive library for automated work with Dnevnik

Table of contents:

About

PyPI library. This library developed for one year, its a big time for this project. I am very happy for this project. This is a big push for a seventh grade developer. I've known since 5th grade that the diary app is very buggy, which interfered with the learning process. It was necessary to make a Telegram bot, but a foundation was needed. That's how the idea was born

Docs

Its a Documentation for this library

UserToken

New system to get auth token

Create config file

from dnevniklib import UserToken
UserToken(_login="<LOGIN>", _password="<PASSW>", browser="<CHROME OR FIREFOX>", config_file="dnevnik.json").configuration() # File must be done, but error

Get token

from dnevniklib import UserToken
UserToken(_login="<LOGIN>", _password="<PASSW>", browser="<CHROME OR FIREFOX>", config_file="dnevnik.json").get_token() # Wait 10-15 second

User

Get user attendance

from dnevniklib import User
user = User(token="")
print(user.get_attendance_by_date(to_date="", from_date="")) # The date in a supported format can be found User().get_date_in_format(year, month, day)

Get user name

from dnevniklib import User
user = User(token="")
print(user.first_name)

Get user class

from dnevniklib import User
user = User(token="")
print(user.class_name)

Marks

Get user marks by date

from dnevniklib import User, Marks
user = User(token="")
marks=Marks(user=user)
print(marks.get_marks_by_date(date="")) # The date in a supported format can be found User().get_date_in_format(year, month, day)

Get user trimester marks

from dnevniklib import User, Marks
user = User(token="")
marks=Marks(user=user)
print(marks.get_trimester_marks(trimester=0)) 

Homeworks

Get a homework by date

from dnevniklib import User, Homeworks
user = User(token="")
homeworks=Homeworks(user=user)
print(homeworks.get_homeworks_by_date(date="")) # The date in a supported format can be found User().get_date_in_format(year, month, day)

School

Get a school data

from dnevniklib import User, School
user = User(token="")
school=School(session=user.session, token=user.token, data_about_user=user.data_about_user)
print(school.get_info_about_school())

Thanks!

I would like to say a big thank you to one person. Without him, I would not have written such a project. He helped before writing the code. Fixed, thank you!

About

a lib for automatization work with dnevnik

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%