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, mends Frameworks libraries two sources share a basename for, 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.

Metadata

Release files for kavacha 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kavacha 0.0.4
File Size Uploaded Provenance Actions
kavacha-0.0.4.tar.gz 27.6 kB Without provenance Details for kavacha-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kavacha 0.0.4
File Interpreter ABI Platform Actions
kavacha-0.0.4-py3-none-any.whl Python 3 none any Details for kavacha-0.0.4-py3-none-any.whl

Total release size: 59.1 kB

Release files / kavacha-0.0.4.tar.gz

Download URL kavacha-0.0.4.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e7121d5ec2d88ab1547ef2e740d9bdc2c5db4099943dde2eddc16bb057478b6d
BLAKE2b-256 checksum
How to use checksums
556499ccc9527812864a4877be7bb2709d2db27702f5295250de8956d32cf7c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / kavacha-0.0.4-py3-none-any.whl

Download URL kavacha-0.0.4-py3-none-any.whl
Size 31.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c89f5e9846ec8875232483cada095234fe66ef0533f672bf953ba7dc71a07f5
BLAKE2b-256 checksum
How to use checksums
a49c9254b5e7d8274df675fe18acd86781e4190c7117d7286ca63ee4b204bfa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for kavacha 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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