Kadi4Mat API library.
Project description
Kadi-APY
Kadi-APY is a library for use in tandem with Kadi4Mat. The REST-like API of Kadi4Mat makes it possible to programmatically interact with most of the resources that can be used through the web interface by sending suitable HTTP requests to the different endpoints the API provides. Detailed information about the API itself can be found in the developer documentation of Kadi4Mat.
The goal of this library is to make the use of this API as easy as possible. It offers both an object oriented approach to work with the API in Python as well as a command line interface (CLI). The library is written in Python 3 and works under both Linux and Windows.
Quickstart
Installation
Install and update using pip:
pip3 install kadi-apy -U
Configuration
To connect to a Kadi4Mat instance you need the host and a personal access token which can be stored in a config file. Run
kadi-apy config create
to create the config file. See the documentation for more details.
Simple Python example
Upload a file to a record via
from kadi_apy import KadiManager
manager = KadiManager()
record = manager.record(identifier="my_identifier", create=True)
record.upload_file("path_to_file")
Simple CLI example
Upload a file to a record via
kadi-apy records add-file -R my_identifier -n path_to_file
Links
- Source code: https://gitlab.com/iam-cms/kadi-apy
- Releases: https://pypi.org/project/kadi-apy/
- Documentation:
- Stable (reflecting the latest release): https://kadi-apy.readthedocs.io/en/stable/
- Latest (reflecting the develop branch): https://kadi-apy.readthedocs.io/en/latest/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for kadi_apy-0.14.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b08ab518e499765974e057c72c86829a35c1fda83154dda287d506acaaaa5e2a |
|
MD5 | e833aab5ff370ac1f95dff787bd6ca84 |
|
BLAKE2b-256 | 4278cc49bd1d9fc6557e59a1427befe672385087dba2db310bcd7097a77fc22b |