Metadata-Version: 2.1
Name: kthutils
Version: 1.0
Summary: Various tools for automation at KTH
Home-page: https://github.com/dbosk/kthutils
License: MIT
Author: Daniel Bosk
Author-email: dbosk@kth.se
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: cachetools (>=5.2.0,<6.0.0)
Requires-Dist: rich (>=13.3.2,<14.0.0)
Requires-Dist: typer (>=0.7.0,<0.8.0)
Requires-Dist: typerconf (>=1.1,<2.0)
Requires-Dist: weblogin (>=1.5,<2.0)
Project-URL: Bug Tracker, https://github.com/dbosk/kthutils/issues
Project-URL: Repository, https://github.com/dbosk/kthutils
Project-URL: Releases, https://github.com/dbosk/kthutils/releases
Description-Content-Type: text/markdown

This package provides various utilities for automation at KTH. It
provides the following modules:

- `kthutils.ug`: Access the UG editor through Python.

We also provide a command-line interface for the modules. This means
that the functionality can be accessed through both Python and the
shell.

An example: We want to add the user `dbosk` as teacher in the group

  edu.courses.DD.DD1317.20232.1.teachers

In Python, we would do

```python
import kthutils.credentials
import kthutils.ug

ug = kthutils.ug.UGsession(*kthutils.credentials.get_credentials())

group = ug.find_group_by_name("edu.courses.DD.DD1317.20232.1.teachers")
user = ug.find_user_by_username("dbosk")

ug.add_group_members([user["kthid"]], group["kthid"])
```

In the shell, we would do

```bash
kthutils ug members add edu.courses.DD.DD1317.20232.1.teachers dbosk
```

Install the tools using `pip`:

```bash
python3 -m pip install -U kthutils
```

