Skip to main content

Kontr Portal REST API Client

Kontr Portal REST API Client is the Portal REST API wrapper over the resources in the portal. It supports CRUD operations and simple management over entities.

Kontr 2 is the project created on FI MUNI to test and execute students solutions for programming assignments.

Setup

Install and update using the pip:

$ pip install kontr-api

Simple examples

Simple examples how to configure and user the API Client.

Example how to manage the users.

from kontr_api import KontrClient

portal_url='https://localhost'
username='admin'
password='123456'

kontr_client = KontrClient(url=portal_url, username=username, password=password)

# List all users
kontr_client.users.list()

# Create new user
kontr_client.users.create(username='xlogin', name='Test user', uco='123456')

# Get user
user = kontr_client.users.get('xlogin')

# Update user's name
user['name'] = 'new name'
user.update() # or use the kontr_client.users.update({ 'name': 'new name' }, 'xlogin')

# Set user's password
user.set_password('Password.123')

# Delete the user
user.delete() # or use the kontr_client.users.delete('xlogin')

Contributing

Take a look at the contribution guide.

Metadata

Release files for kontr-api 0.2.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 kontr-api 0.2.0
File Size Uploaded Provenance Actions
kontr-api-0.2.0.tar.gz 14.6 kB Without provenance Details for kontr-api-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kontr-api 0.2.0
File Interpreter ABI Platform Actions
kontr_api-0.2.0-py3-none-any.whl Python 3 none any Details for kontr_api-0.2.0-py3-none-any.whl

Total release size: 34.5 kB

Release files / kontr-api-0.2.0.tar.gz

Download URL kontr-api-0.2.0.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
15d8bbd083a52f27cf4a490a0e59707339cadadf18458154ba500c37b9671a08
BLAKE2b-256 checksum
How to use checksums
b88a83bfaaec0e44c693a0bb0f38cd4dbba956f8dc90a73a967be2f25fbd5e62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.14.15-arch1-1

Release files / kontr_api-0.2.0-py3-none-any.whl

Download URL kontr_api-0.2.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a99806316f1cbd40c16b322c249ca287a69b458b5840a1c07da614ebfd8ede94
BLAKE2b-256 checksum
How to use checksums
460d6d4c188f03cb074be487fbfc76ed7247a64b66918132cfbf66c810e585bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.14.15-arch1-1

Security for kontr-api 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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