Skip to main content

Kadi4Mat API library.

Project description

Kadi-APY

pypi license zenodo docs

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 a sample config file. See the documentation for more details.

Simple Python example

Upload a file to a record:

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:

kadi-apy records add-file -R my_identifier -n path_to_file

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

kadi_apy-0.15.0-py3-none-any.whl (69.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page