Skip to main content

bare-kit-python

Python bindings for Bare Kit, which runs Bare in a thread of its own within the application, known as a worklet, with an IPC to it exposed as Bare.IPC inside the worklet.

pip install bare-kit

Usage

import asyncio
from pathlib import Path

from bare_kit import start


async def main():
    async with await start(Path(__file__).parent / "app.bundle") as worklet:
        await worklet.write(b"Hello world")

        async for data in worklet:
            print(data.decode())


asyncio.run(main())

Where app.bundle is a Bare bundle using Bare.IPC:

Bare.IPC.on('data', (data) => Bare.IPC.end(data))

Iterating a worklet yields the data that it writes to Bare.IPC until it ends its side. As Bare.IPC keeps the worklet alive, end() ends the data sent to it so that it may exit on its own, and wait() returns its exit code. Reading to the end closes the connection, so that the worklet may exit. Writes raise BrokenPipeError once the data sent has ended, the connection has closed, or the worklet has closed its side. Closing a worklet terminates it and waits for it to exit, so keep it open for as long as it should run. Once closed, terminate() does nothing and suspend(), resume() and wakeup() raise ValueError.

These bindings are a thin layer over Bare Kit, whose README covers the lifecycle, IPC, suspension, addons, and error handling of a worklet. In Python terms:

  • If source is None, start() reads filename at runtime, so the worklet may be a module next to its node_modules rather than a bundle.
  • Python loads Bare Kit as a shared library, so native addons resolve the symbols of Bare from it as is.
  • Bare Kit calls back on threads of its own, which the bindings hand to the event loop that called start(), so use the worklet from that loop.
  • An uncaught error in the worklet aborts the process, Python included, so report errors over Bare.IPC as described in error handling.

Platforms

The package supports Linux, macOS, and Windows on arm64 and x64, and its wheels include Bare Kit for the platform they are for.

License

Apache-2.0

Metadata

Release files for bare-kit 0.2.1

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

Source distribution (sdist)

Source distribution for bare-kit 0.2.1
File Size Uploaded Provenance Actions
bare_kit-0.2.1.tar.gz 13.8 kB With provenance Details for bare_kit-0.2.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for bare-kit 0.2.1
File Actions
bare_kit-0.2.1-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for bare_kit-0.2.1-py3-none-win_arm64.whl
bare_kit-0.2.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for bare_kit-0.2.1-py3-none-win_amd64.whl
bare_kit-0.2.1-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details for bare_kit-0.2.1-py3-none-manylinux_2_34_x86_64.whl
bare_kit-0.2.1-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details for bare_kit-0.2.1-py3-none-manylinux_2_34_aarch64.whl
bare_kit-0.2.1-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details for bare_kit-0.2.1-py3-none-macosx_13_0_x86_64.whl
bare_kit-0.2.1-py3-none-macosx_13_0_arm64.whl Python 3 none macOS 13.0+ ARM64 Details for bare_kit-0.2.1-py3-none-macosx_13_0_arm64.whl

Total release size: 101.0 MB

Release files / bare_kit-0.2.1.tar.gz

Download URL bare_kit-0.2.1.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bf5ac674f8c5e178c546b4ed959716cc2c151fc4a4da078a0302101e5d0650f0
BLAKE2b-256 checksum
How to use checksums
1ed92104b145dd79242fdcc73dc5c2a972932127db4b99195db664afe070e2d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / bare_kit-0.2.1-py3-none-win_arm64.whl

Download URL bare_kit-0.2.1-py3-none-win_arm64.whl
Size 16.7 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
1160d0d49edb7c096cba8dad2b8358aef2453b9c629726b0d54f6b150b6353cb
BLAKE2b-256 checksum
How to use checksums
3c33e07457b393fa9ef42b9f54a31f1181c803693a9959e7c99a01d4cd9b4e49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / bare_kit-0.2.1-py3-none-win_amd64.whl

Download URL bare_kit-0.2.1-py3-none-win_amd64.whl
Size 17.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
a1464cbbb408bf434f8134b873c933299dd04c70433041e086d0d3a4eca8c93c
BLAKE2b-256 checksum
How to use checksums
c8d5f63df798be557434c99ee3e3614808c77e44baa15265ce95e07d32197d54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / bare_kit-0.2.1-py3-none-manylinux_2_34_x86_64.whl

Download URL bare_kit-0.2.1-py3-none-manylinux_2_34_x86_64.whl
Size 17.0 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
15463e50215fce00efec890d477cf9b186ca577e17ea214779bf4db9267fa9b2
BLAKE2b-256 checksum
How to use checksums
532b2835cf5dd5f0ac03e11e5270c541f5fbe3a25dad6951a6265ebc2c7cfcdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / bare_kit-0.2.1-py3-none-manylinux_2_34_aarch64.whl

Download URL bare_kit-0.2.1-py3-none-manylinux_2_34_aarch64.whl
Size 16.5 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
8c1bcb27f2462cba67dd7ba9765771cc52e2103948d07c1a0e6a7ee5b67ea88d
BLAKE2b-256 checksum
How to use checksums
7134b54275dd49cbdfea260700a404ff3f2b01d7faaa6420d8526fd228577ff6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / bare_kit-0.2.1-py3-none-macosx_13_0_x86_64.whl

Download URL bare_kit-0.2.1-py3-none-macosx_13_0_x86_64.whl
Size 17.1 MB
Tags Python 3 macOS 13.0+ x86-64
SHA-256 checksum
How to use checksums
dba38dd33fa2d9c9de665134bb3e4a3f235d35a38ad009fd6515ed1e8662b9ba
BLAKE2b-256 checksum
How to use checksums
8c773f780929cc46260801cbc7602f28ad9a4f37a8570ff44f0ea3c05c1516be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / bare_kit-0.2.1-py3-none-macosx_13_0_arm64.whl

Download URL bare_kit-0.2.1-py3-none-macosx_13_0_arm64.whl
Size 16.2 MB
Tags Python 3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
3426cd6aff39d7436a44ba632c1b49a36ec3e5068f7b0664e9951a152513b8dd
BLAKE2b-256 checksum
How to use checksums
89f08bf482d9d79d527617f1e5c252f8188ec793f0137af13c64f4b27d02bc79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for bare-kit 0.2.1

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.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for bare_kit-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

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