<commit_before>===============
Getting Started
===============

Before we are getting started, there are a few things to know about WebUntis
and its API:

.. note::

    - **You need an account for the API.** You can't access the API
      anonymously. It's designated that schools give each student a user
      account for the WebUntis server they're using. Many schools just make the
      timetable world-accessible though, preventing any use of the API. If you
      happen to be at such a school, you're a pitiful bastard.

    - **The API is read-only.** And there's nothing you can do about it.

    - **The API documentation does not explain the purpose of some methods.**
      So i can't do a much better job at it.

    - **Different schools, different rules.** It is not neccessary that schools
      enter information about, for example, a teacher, in the correct format.
      It might happen that a school abuses the name field of a teacher to just
      write the teacher's initials in it. Testing is the only sane way out of
      this.

    - **Don't like something about the usage of my package?** Please, `let me
      know! <https://github.com/untitaker/python-webuntis/issues/new>`_ I don't
      want python-webuntis to become as inconsistent and *weird* as the API it
      is wrapping.

Are you still reading? Okay, let's install the webuntis package::

    pip install webuntis

Here's the example from the :doc:`Intro <index>` again::

    import webuntis

    s = webuntis.Session(
        server='webuntis.grupet.at:8080',
        username='api',
        password='<PASSWORD>',
        school='demo_inf',
        useragent='WebUntis Test'
    )

    s.login()

    for klasse in s.klassen():<commit_msg>Fuck 'em.<commit_after>===============
Getting Started
===============

Before we are getting started, there are a few things to know about WebUntis
and its API:

.. note::

    - **You need an account for the API.** You can't access the API
      anonymously. It's designated that schools give each student a user
      account for the WebUntis server they're using. Many schools just make the
      timetable world-accessible though, preventing any use of the API. If you
      happen to be at such a school, you're a pitiful bastard.

    - **The API is read-only.** And there's nothing you can do about it.

    - **The API documentation does not explain the purpose of some methods.**
      So i can't do a much better job at it.

    - **Different schools, different rules.** It is not neccessary that schools
      enter information about, for example, a teacher, in the correct format.
      It might happen that a school abuses the name field of a teacher to just
      write the teacher's initials in it. The timezone of the dates and times
      is also dependent on how your school inserted those. Testing is the only
      sane way out of this.

    - **Don't like something about the usage of my package?** Please, `let me
      know! <https://github.com/untitaker/python-webuntis/issues/new>`_ I don't
      want python-webuntis to become as inconsistent and *weird* as the API it
      is wrapping.

Are you still reading? Okay, let's install the webuntis package::

    pip install webuntis

Here's the example from the :doc:`Intro <index>` again::

    import webuntis

    s = webuntis.Session(
        server='webuntis.grupet.at:8080',
        username='api',
        password='<PASSWORD>',
        school='demo_inf',
        useragent='WebUntis Test'
    )

    s.login()

    for klasse in s.klassen():
{'fraction_non_alphanumeric': 0.09249367444475681, 'fraction_numerical': 0.002249086308687096, 'mean_word_length': 2.9098901098901098, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6394635', 'n_tokens_mistral': 1024, 'n_tokens_neox': 947, 'n_words': 470}