Skip to main content

kavacha

Install

pip install kavacha
pip install "kavacha[window]"
pip install "kavacha[macapp]"
pip install "kavacha[windows]"

The extras add native-window support and platform freezer dependencies.

Describe the app

from kavacha import App, tree, doc_types, mypyc_modules

app = App(
    name='Demo',
    entry='demo_app.py',
    version='1.2.3',
    icon='assets/Demo.icns',
    packages=['demo', 'fasthtml', 'uvicorn', 'numpy'],
    includes=['demo.cli', *mypyc_modules()],
    grafted=['apsw', 'playwright'],
    data=tree('demo/static', 'demo/static'),
    extras=['desktop'],
    doc_types=doc_types(['.py', '.rs', '.md']),
)
app.py2app_options()

One App specification supplies both platform freezers. Explicit packages and modules cover imports a freezer cannot discover.

Build

from kavacha import build, check

check(app, root)
build(app, root, setup_py='packaging/macos/setup.py')

build uses a compatible interpreter, installs pinned requirements from uv.lock, refuses to replace a running bundle unless forced, and records the source commit.

After freezing

from kavacha import finish

finish(bundle, app)

finish grafts archive-incompatible packages, removes unreachable archive copies, links duplicate files, and installs the modern icon before signing.

Icons

from kavacha.icons import icons_for

icons_for('assets/logo.png', 'assets', 'Demo')

A square image of at least 512 pixels produces platform and web icon assets. Invalid sources are rejected rather than upscaled.

Window

from kavacha.window import run_shell, shell_ready

ok, why = shell_ready()
run_shell('http://127.0.0.1:8000', title='Demo', size='1440x900')

run_shell opens a pywebview window over a loopback server. The host supplies menus and workspace callbacks.

Status

The spec, build driver, bundle surgery and icons are covered by tests that run anywhere. The window and menus are ported working code, but the platform they matter on is not one CI can exercise here — treat that module as needing a real run on macOS before you rely on it.

Download files

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

Source Distribution

kavacha-0.0.2.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

kavacha-0.0.2-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file kavacha-0.0.2.tar.gz.

File metadata

  • Download URL: kavacha-0.0.2.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.1

File hashes

Hashes for kavacha-0.0.2.tar.gz
Algorithm Hash digest
SHA256 daff924bc411b860d907dd6d89304afdce5f4ecf38906907895c6985ec0f04e5
MD5 30fbd810871ac5ba02ee7b9bf686d5b3
BLAKE2b-256 f5ee32a426d996ab639adf6edecc7b0c964db2d1e0750dd85b78b24772bb87fc

See more details on using hashes here.

File details

Details for the file kavacha-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: kavacha-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.1

File hashes

Hashes for kavacha-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2734ad895bc5cd278078773195b9a9280a8ad5f836b4da7c230641377b6d01e
MD5 6c6ec2c6a1481fde42b02b6e25528cdc
BLAKE2b-256 dea7b3dc01dbab9bba343bc124faca94e5e24383beb6298163ac60244b966c57

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page