Metadata-Version: 2.1
Name: kaki-cli
Version: 1.0.6
Summary: Kivy Hotreload
Home-page: https://github.com/kengoon/kaki
License: MIT
Author: Kenechukwu Akubue
Author-email: kengoon19@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: buildozer (>=1.5.0,<2.0.0)
Requires-Dist: cython (>=3.0.12,<4.0.0)
Requires-Dist: kivy (>=2.3.1,<3.0.0)
Requires-Dist: psutil (>=7.0.0,<8.0.0)
Requires-Dist: setuptools (>=78.1.0,<79.0.0)
Requires-Dist: watchdog (>=6.0.0,<7.0.0)
Project-URL: Repository, https://github.com/kengoon/kaki
Description-Content-Type: text/markdown

# Kaki - Advanced application library for Kivy

This library enhance Kivy frameworks with opiniated features such as:

- Auto reloading kv or py (`watchdog` required, limited to some uses cases)
- Idle detection support
- Foreground lock (windows only)

## Installation
```shell
pip install kaki-cli
```

## Example

This is a bootstrap that will:
- automatically declare the module `live.ui` (`live/ui.py`) as a provider for the widget `UI`
- build the application widget, and show it to a window

If the bootstrap is started with the environment variable `DEBUG=1`, it will start a watchdog, and listen for changes, according to `AUTORELOADER_PATHS`.
When something changes, the current application widget will be cleared out, and a new one will be instanciated, after reloading.

```shell
kaki run # deploy app and run hotreload
kaki run --build # build, deploy and run hotreload
```

## Idle Management

The idle detection feature is designed to trigger an action if the user has not touched the screen for a certain period of time. This can be used to display an attractor screen, screensaver, or other content.

To enable idle detection, set the `IDLE_DETECTION` configuration to `True`.
Kaki will then listen for touch down/move events. If no such events occur within the `IDLE_TIMEOUT` interval, or if the `rearm_idle` function has not been called, the `on_idle` event will be triggered on the application class. If a touch event occurs or `rearm_idle` is called while the system is in idle mode, the `on_wakeup` event will be triggered on the application class.

If you are playing a video and do not want idle detection to be triggered, you can use the `rearm_idle` function on the application class to reset the idle timer to 0 seconds.
