Skip to main content

Kadi-APY Helper

A lightweight Python package for simplified management of users, groups, collections, and records in Kadi4Mat based on kadi-apy.

Installation

Install the package in your project via uv:

uv add kadi-apy-helper

Alternatively, you can install the package traditionally via pip:

pip install kadi-apy-helper

Setup (One-Time)

Before you can access Kadi4Mat, the local configuration file must be created with your instance URL (host) and your Personal Access Token (PAT):

from kadi_apy_helper import setup_kadi_apy

setup_kadi_apy(
    host_info="https://your-institution.edu",
    pat_token="YOUR_PERSONAL_ACCESS_TOKEN"
)

Quickstart & Usage

1. Load and Manage Elements

Use create_kadi_elements() to set up a structured dictionary for your loaded objects:

from kadi_apy_helper import (
    create_kadi_elements,
    load_users,
    load_groups,
    load_records,
    load_collections,
    print_loaded_elements,
)

# Initialize empty structure for elements
elements = create_kadi_elements()

# Load existing elements from Kadi4mat by their identifiers
load_users(user_ids=["jdoe"], kadi_elements=elements)
load_groups(group_ids=["research_group_xy"], kadi_elements=elements)
load_collections(collection_ids=["project-2026"], kadi_elements=elements)
load_records(record_ids=["measurement-series-01"], kadi_elements=elements)

# Print loaded elements clearly
print_loaded_elements(elements)

2. Create New Groups, Collections, and Records

from kadi_apy_helper import add_group, add_collection, add_record

# Create a new group
group = add_group(
    identifier="new-group",
    title="My Research Group",
    description="Description of the group",
    users=[("jdoe", "member")]
)

# Create a new collection
collection = add_collection(
    identifier="new-collection",
    title="Measurement Campaign 2026",
    description="All datasets of the measurement campaign",
    add_tags=["experiment", "2026"]
)

# Create a new record and upload files
record = add_record(
    identifier="measurement-001",
    title="First Test Run",
    record_type="dataset",
    description="Raw data of the first test run",
    add_tags=["raw-data"],
    fileloc=["./data/measurement.csv"],
    filedesc=["Measurement data as CSV"],
    collection_link=[collection.id]
)

3. Use a Custom KadiManager Instance (Optional)

By default, all functions use the locally stored configuration file (~/.kadi-apy.cfg). If you want to work with multiple Kadi4Mat instances in parallel, you can pass your own KadiManager instance to any function:

from kadi_apy import KadiManager
from kadi_apy_helper import add_group

custom_manager = KadiManager(
    host="https://demo-kadi4mat.iam.kit.edu/",
    pat="ANOTHER_TOKEN"
)

add_group(
    identifier="test-group",
    title="Test Group",
    description="Created via custom manager",
    manager=custom_manager
)

Requirements

  • Python >= 3.14
  • kadi-apy >= 0.51.0

Metadata

Release files for kadi-apy-helper 0.1.1

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

Source distribution (sdist)

Source distribution for kadi-apy-helper 0.1.1
File Size Uploaded Provenance Actions
kadi_apy_helper-0.1.1.tar.gz 4.5 kB Without provenance Details for kadi_apy_helper-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kadi-apy-helper 0.1.1
File Interpreter ABI Platform Actions
kadi_apy_helper-0.1.1-py3-none-any.whl Python 3 none any Details for kadi_apy_helper-0.1.1-py3-none-any.whl

Total release size: 9.9 kB

Release files / kadi_apy_helper-0.1.1.tar.gz

Download URL kadi_apy_helper-0.1.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b9d76ee2b7c0fdfe134df373c6e242ab1b66ac9977cd128237d8b92ce34aee81
BLAKE2b-256 checksum
How to use checksums
bb4bcfacabf02193f85bf3796e5e618ca71eef39ee7c0b190fddf1d1873a813f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / kadi_apy_helper-0.1.1-py3-none-any.whl

Download URL kadi_apy_helper-0.1.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a66a47eb88b619a75882bdd6d267f4e04daca86fab962a008d94ddbddc07900
BLAKE2b-256 checksum
How to use checksums
ddb1cd4845a709613bd8615ed1109b28ffe3f64c557a080cb9939b476ab2924b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for kadi-apy-helper 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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