bakalari 0.2.3

  • Example
  • Installing
  • Versions
  • 71


Bakaláři is Dart library that can be used for accessing Bakaweb API. Bakaláři (Bakaweb) is Czech school system. This library allows gathering information like grades, timetable, PMs, or homework.

This library is directly based on vakabus/pybakalib.

If you are at GitHub, the package can be found at


Open pubspec.yaml of your project and insert following line into dependencies section:

bakalari: ^0.2.3

Run pub get and it should install automatically.


Into main.dart, insert this line:

import 'package:bakalari/bakalari.dart';

Create some async method. Instantiate Bakalari class and don't forget to log in (.logIn()). Now, you can call methods like .getGrades() on the instance.

See example/main.dart for example code.

If you run into problems, create GitHub issue and I'll get into it as soon as possible.

Other community projects

  • pybakalib is python library that powers the alternative Bakaweb website,
  • bakalari-api is unofficial documentation of Bakaweb API. Apart from documentation, this organization provides some unofficial apps that use the Bakaweb API.

Version 0.2.3

Updated dependencies and removed obsolate method.

Library now tries to fix provided school URI itself. It takes the domain and converts it to Scheme is forced as https.

Let me know if there are any issues with this, and I'll add option to override it or change the URI fix.

Version 0.2.2

Fixed spelling. Login failure will throw useful explanation.

Version 0.2.1

Library now internally fetches timetable for the next week if it's weekend - so for example, on Saturday, week 1, you'll already see timetable for week 2.

Version 0.2.0

Minor fix

Version 0.1.9

Timetable serialization hotfix

Version 0.1.8

Fixed permanent timetable. Each timetable may now contain more lessons in one time-spot.

Updated pointycastle package.

Version 0.1.7

Added option to specify timetable date

Version 0.1.4, 0.1.5, 0.1.6

Serialization hotfix

Version 0.1.3

Added serialization support (json_serializable)

Version 0.1.2

Added homework module and subject list module.

Version 0.1.1

Fixed issues with format. Shortened package description.

Version 0.1.0

First release.

Package features grades, timetable, PMs, and basic info about student and school.

Package is published on github (/SoptikHa2/bakalari).


import 'package:bakalari/bakalari.dart';
import 'dart:io';

main(List<String> args) {
  print('Dart example of \'bakalari\' library has loaded.');
      'Enter your school Uri (for example \'\'');
  var uri = stdin.readLineSync();
  print('Enter username');
  var username = stdin.readLineSync();
  print('Enter password');
  stdin.echoMode = false;
  var password = stdin.readLineSync();
  stdin.echoMode = true;

  someAsyncFunction(username, password, uri);

/// The code accessing bakaweb should be in special async function.
void someAsyncFunction(String username, String password, String uri) async {
  var bkw = Bakalari(uri);
  await bkw.logIn(username, password);
      'Welcome, student ${}, class ${bkw.student.schoolClass} (year: ${bkw.student.year})! '
      'This library has successfully connected to ${} (${}). '
      'You can visit the official Bakaweb service by clicking on this link: ${}');

  var grades = await bkw.getGrades();
  for (var grade in grades) {

  var timetable = await bkw.getTimetable();
  var permTimetable = await bkw.getTimetablePermanent();
  print('Timetable is done!');
      'Use debug mode to inspect it, I didn\'t write toString method because of it\'s complexity.');

  var pms = await bkw.getMessages();
  for (var message in pms) {

  var hws = await bkw.getHomework();
  for (var hw in hws) {

  var subjects = await bkw.getSubjects();
  for (var subject in subjects) {

  // Print serialized list of subjects
  print( => s.toJson()));

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  bakalari: ^0.2.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:bakalari/bakalari.dart';
Version Uploaded Documentation Archive
0.2.3 Jan 20, 2019 Go to the documentation of bakalari 0.2.3 Download bakalari 0.2.3 archive
0.2.2 Jan 17, 2019 Go to the documentation of bakalari 0.2.2 Download bakalari 0.2.2 archive
0.2.1 Jan 13, 2019 Go to the documentation of bakalari 0.2.1 Download bakalari 0.2.1 archive
0.2.0 Jan 12, 2019 Go to the documentation of bakalari 0.2.0 Download bakalari 0.2.0 archive
0.1.9 Jan 2, 2019 Go to the documentation of bakalari 0.1.9 Download bakalari 0.1.9 archive
0.1.8 Jan 2, 2019 Go to the documentation of bakalari 0.1.8 Download bakalari 0.1.8 archive
0.1.7 Dec 28, 2018 Go to the documentation of bakalari 0.1.7 Download bakalari 0.1.7 archive
0.1.6 Dec 26, 2018 Go to the documentation of bakalari 0.1.6 Download bakalari 0.1.6 archive
0.1.5 Dec 26, 2018 Go to the documentation of bakalari 0.1.5 Download bakalari 0.1.5 archive
0.1.4 Dec 26, 2018 Go to the documentation of bakalari 0.1.4 Download bakalari 0.1.4 archive

All 14 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:bakalari/bakalari.dart.

Health suggestions

Format lib/bakalari.dart.

Run dartfmt to format lib/bakalari.dart.

Format lib/src/helpers.dart.

Run dartfmt to format lib/src/helpers.dart.

Format lib/src/modules/gradeModule.dart.

Run dartfmt to format lib/src/modules/gradeModule.dart.

Fix additional 5 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/modules/homeworkModule.dart (Run dartfmt to format lib/src/modules/homeworkModule.dart.)
  • lib/src/modules/privateMessagesModule.dart (Run dartfmt to format lib/src/modules/privateMessagesModule.dart.)
  • lib/src/modules/subjectListModule.dart (Run dartfmt to format lib/src/modules/subjectListModule.dart.)
  • lib/src/modules/timetableModule.g.dart (Run dartfmt to format lib/src/modules/timetableModule.g.dart.)
  • lib/src/school.dart (Run dartfmt to format lib/src/school.dart.)


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.12.0+1 0.12.0+1
intl ^0.15.7 0.15.7
json_annotation ^2.0.0 2.0.0
pointycastle ^1.0.0 1.0.0
xml ^3.2.5 3.2.5
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
path 1.6.2
petitparser 2.1.0
source_span 1.5.2
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
build_runner ^1.1.3
json_serializable ^2.0.1