Skip to main content

Kivy Hotreload

Project description

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

pip install https://github.com/kengoon/kaki/releases/download/v1.0.1/kaki_cli-1.0.1-py3-none-any.whl

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.

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.

Project details


Download files

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

Source Distribution

kaki_cli-1.0.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kaki_cli-1.0.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file kaki_cli-1.0.1.tar.gz.

File metadata

  • Download URL: kaki_cli-1.0.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.0-130-generic

File hashes

Hashes for kaki_cli-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bb3bcff21eafeed8fd064e463398aaab28068585867326439e56d1a98998a1e9
MD5 b2e1eedff4cad6ddd9777acc22a23823
BLAKE2b-256 a2cc0abd3a4c2df1894b6bc9273aef8037bd2aa4304da1a3dd7969ad1fd65304

See more details on using hashes here.

File details

Details for the file kaki_cli-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: kaki_cli-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.0-130-generic

File hashes

Hashes for kaki_cli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 208a047fd135f384656dd7d7b70961ea36ca4859bb321da43c197e97b0cf3f31
MD5 6a2584ee12f65fda9a84844611c3d7d1
BLAKE2b-256 4ea86037454788743e6739b8290ccf20cc322a5f396390e77d57b3675a7b2929

See more details on using hashes here.

Supported by

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