Skip to main content

Luvatrix runtime and plotting toolkit

Project description

Luvatrix

Luvatrix is a Python app protocol and rendering runtime for building custom apps that can run headless, on macOS, as static browser-side web apps, and through scaffolded native Android/iOS projects.

Install

Base install:

pip install luvatrix

Optional platform/runtime extras:

pip install "luvatrix[macos]"
pip install "luvatrix[vulkan]"
pip install "luvatrix[macos,vulkan]"
pip install "luvatrix[web]"
pip install "luvatrix[android]"
pip install "luvatrix[ios]"

The base package intentionally includes common raster/data dependencies (numpy and Pillow). Platform-specific renderers still live behind extras. Extras are target-scoped: installing luvatrix[ios] does not install macOS PyObjC bindings, Vulkan bindings, web socket runtimes, or Android-only helpers. iOS ABI-specific packages are prepared by the native scaffold's ios/scripts/setup_ios.sh and copied into the app-owned PyPackages bundle.

Create An External App

Create a standalone app outside this repository:

luvatrix init-app my_app
cd my_app
luvatrix validate-app . --render headless
luvatrix run-app . --render headless --ticks 1

For an Android-only app, validate against the Android runtime from your development machine:

luvatrix init-app my_android_app --template camera
cd my_android_app
luvatrix validate-app . --render android-emulator
luvatrix run-app . --render headless --ticks 1

Build and serve a browser-side app:

luvatrix build-web . --out dist/web
luvatrix serve-web .

Run with macOS rendering:

pip install "luvatrix[macos,vulkan]"
luvatrix validate-app . --render macos
luvatrix run-app . --render macos

Native Scaffolds

Native Android and iOS projects are app-owned. Scaffold them into your app repository when you need native targets:

luvatrix init-native . --target android --out android
luvatrix init-native . --target ios --out ios

Then run with the app-owned native project:

luvatrix run-app . --render android-emulator --native-project android
luvatrix run-app . --render ios-simulator --native-project ios

Native prerequisites:

  • Android: Android SDK, ADB, Gradle/Android Gradle Plugin support, and a configured emulator or device.
  • iOS: Xcode, xcodegen, signing for physical devices, and the iOS Python support assets prepared by the scaffold's ios/scripts/setup_ios.sh.
  • Vulkan on macOS: the Python vulkan binding plus a native Vulkan SDK/loader such as Vulkan SDK or MoltenVK.

Native package sync also prunes unrelated platform runtimes from app bundles. Android bundles keep the Android runtime tree, iOS bundles keep the iOS runtime tree, and sibling macOS/web/native-template trees are left out unless that target is being packaged.

App Layout

A minimal Luvatrix app is just:

my_app/
├── app.toml
└── app_main.py

app.toml declares the app id, protocol version, entrypoint, capabilities, platform support, display metadata, and render preferences. The Python entrypoint returns an object compatible with init(ctx), loop(ctx, dt), and stop(ctx), or a subclass of luvatrix.app.App.

Public app-developer API:

from luvatrix.app import App, AppContext, validate_app_install

See docs/app_protocol.md in the repository for the detailed protocol contract.

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

luvatrix-0.1.6.tar.gz (781.9 kB view details)

Uploaded Source

Built Distribution

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

luvatrix-0.1.6-py3-none-any.whl (832.8 kB view details)

Uploaded Python 3

File details

Details for the file luvatrix-0.1.6.tar.gz.

File metadata

  • Download URL: luvatrix-0.1.6.tar.gz
  • Upload date:
  • Size: 781.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for luvatrix-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bbc51e8487c6ae4942c9f4f20600a7fd056ddb34af7a5ef61963b063e3ea43bb
MD5 cddab5b88ac3cac0399c96622278461c
BLAKE2b-256 1303b55d5d0045a9313717f747f605dd84975f53814a79ca1f61e13bb5c169d5

See more details on using hashes here.

File details

Details for the file luvatrix-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: luvatrix-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 832.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for luvatrix-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 51f83f656d116ac3ca69d89f53ab19f024d402439b26eb3db92ee527791b3000
MD5 5ea5d222adb203717a8106a86e553c7d
BLAKE2b-256 ba09e7d7c773737bfe52bd37f949a4e5dd4f3dc36063a4c2279105e326182c35

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