Skip to main content

Shisis - Shibboleth ISIS

PyPI License Code style: black

Shisis is a small library to handle authentication for TU-Berlin's Moodle instance "ISIS" via Shibboleth.

Install

pip install shisis-async

Usage

CLI

$ shisis -h
usage: shisis [-h] [-u USERNAME] [-p PASSWORD] [-t | -r]

options:
  -h, --help            show this help message and exit
  -u, --username USERNAME
                        Shibboleth username (environment: SHISIS_USER)
  -p, --password PASSWORD
                        Shibboleth password (environment: SHISIS_PASS)
  -t, --token           Only print token
  -r, --private-token   Only print private_token

Code

import asyncio

import aiohttp
from shisis import Shisis


async def main():
    async with aiohttp.ClientSession() as session:
        shisis = Shisis(session)
        tokens = await shisis.authenticate("username", "password")
        print(tokens)


asyncio.run(main())

Code with poodle_async_full

import asyncio
import os

import aiohttp
from poodle_async_full import ApiClient, Configuration, DefaultApi
from shisis import Shisis


async def main():
    configuration = Configuration(host="https://isis.tu-berlin.de")

    async with ApiClient(configuration) as client:
        poodle = DefaultApi(client)
        config = await poodle.tool_mobile_get_public_config()

        async with aiohttp.ClientSession() as shisis_client:
            shisis = Shisis(shisis_client)
            tokens = await shisis.authenticate(
                "username",
                "password",
                config,
                config.identityproviders,
            )
            configuration.api_key["wstoken"] = tokens.token

        site_info = await poodle.core_webservice_get_site_info()
        print(site_info.userid)


asyncio.run(main())

License

GPL-3.0

Contributions

Contributions are welcome.

To contribute changes, open a PR on the main branch.

[!NOTE]
Before commiting, run git config core.hooksPath .githooks and fix linting errors.

Changelog

See CHANGELOG.md

Metadata

Release files for shisis-async 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shisis-async 1.3.0
File Size Uploaded
shisis_async-1.3.0.tar.gz 30.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shisis-async 1.3.0
File Interpreter ABI Platform
shisis_async-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.0 kB

Release files / shisis_async-1.3.0.tar.gz

Download URL shisis_async-1.3.0.tar.gz
Size 30.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c1a5b41a34b8bc46947031188175425e643ac5fb2e3855d3f731c85d81a68f44
BLAKE2b-256 checksum
How to use checksums
4be84611ba982e68ed22494640473dcf4a51d051a461e52bc48929c870047d27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / shisis_async-1.3.0-py3-none-any.whl

Download URL shisis_async-1.3.0-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c531ef9d2f4dbeef0136550bdce7c0816280fa2ef9b1a2c96bf09a5df5d3734
BLAKE2b-256 checksum
How to use checksums
297751df9a03cc3df2e600ccc0133c196aef16a4a47f49a718d6e612be203c0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page