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.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 kadi-apy-helper 0.1.0
File Size Uploaded Provenance Actions
kadi_apy_helper-0.1.0.tar.gz 4.5 kB Without provenance Details for kadi_apy_helper-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.8 kB

Release files / kadi_apy_helper-0.1.0.tar.gz

Download URL kadi_apy_helper-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
af628ae5102505b7149254d87cdbc8ce36b83db01a122971995158429338f080
BLAKE2b-256 checksum
How to use checksums
2719498e59cabc825b4fce7b49e039eca23b7d9dbc889ba386eaffafd48892d3
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.0-py3-none-any.whl

Download URL kadi_apy_helper-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97836f3f265eac81b986af23ef19b6975e4ef0b91c75767c72dd1f50e56daf4d
BLAKE2b-256 checksum
How to use checksums
8937ae0bb8c2d11fdaa35d7e3796015a7e180e5714fab7025712f3f8a7ebadf8
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.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.

Release history Release notifications | RSS feed

This release

0.1.0 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