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
sourceisNone,start()readsfilenameat runtime, so the worklet may be a module next to itsnode_modulesrather 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.IPCas 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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bare_kit-0.2.0.tar.gz | 13.8 kB | With provenance | Details for bare_kit-0.2.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| bare_kit-0.2.0-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details for bare_kit-0.2.0-py3-none-win_arm64.whl |
| bare_kit-0.2.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for bare_kit-0.2.0-py3-none-win_amd64.whl |
| bare_kit-0.2.0-py3-none-manylinux_2_34_x86_64.whl | Python 3 | none | Linux glibc 2.34+ x86-64 | Details for bare_kit-0.2.0-py3-none-manylinux_2_34_x86_64.whl |
| bare_kit-0.2.0-py3-none-manylinux_2_34_aarch64.whl | Python 3 | none | Linux glibc 2.34+ ARM64 | Details for bare_kit-0.2.0-py3-none-manylinux_2_34_aarch64.whl |
| bare_kit-0.2.0-py3-none-macosx_13_0_x86_64.whl | Python 3 | none | macOS 13.0+ x86-64 | Details for bare_kit-0.2.0-py3-none-macosx_13_0_x86_64.whl |
| bare_kit-0.2.0-py3-none-macosx_13_0_arm64.whl | Python 3 | none | macOS 13.0+ ARM64 | Details for bare_kit-0.2.0-py3-none-macosx_13_0_arm64.whl |
Total release size: 93.6 MB
Release files / bare_kit-0.2.0.tar.gz
| Download URL | bare_kit-0.2.0.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe7a25a2718e7e81e2eab0a08a077e66df36a790a5f1fcab5154bf9ded272dfe
|
|
BLAKE2b-256 checksum How to use checksums |
773bd4518baab2461f9914f1ac5594e469df552c5c79be5479cb399392bd40c7
|
| 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 4, 2026.
Transparency logRelease files / bare_kit-0.2.0-py3-none-win_arm64.whl
| Download URL | bare_kit-0.2.0-py3-none-win_arm64.whl |
|---|---|
| Size | 15.6 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
46a3575f1c4849b0e792e8d53788e5c03a7a103812f8ba3982c2ee1e654629bf
|
|
BLAKE2b-256 checksum How to use checksums |
ed99089d1c7aeb3fabf02dfe73e08585d48c3aa4463438026006fc1ed5107ed2
|
| 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 4, 2026.
Transparency logRelease files / bare_kit-0.2.0-py3-none-win_amd64.whl
| Download URL | bare_kit-0.2.0-py3-none-win_amd64.whl |
|---|---|
| Size | 16.3 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7cbd2b053dbc8fc1c9953a6260d482778acad289459ed0e87b04637dd5f3e58f
|
|
BLAKE2b-256 checksum How to use checksums |
bc74d44028b4a0a92204c381c66476941365ee52cbaecc53cfc0f17faa7fa9d2
|
| 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 4, 2026.
Transparency logRelease files / bare_kit-0.2.0-py3-none-manylinux_2_34_x86_64.whl
| Download URL | bare_kit-0.2.0-py3-none-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 15.6 MB |
| Tags | Linux glibc 2.34+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
7b5316310f2935d634503c7c49077fc18a0c0eded37106937da310a051e47821
|
|
BLAKE2b-256 checksum How to use checksums |
311da1aaa042d6ae89b6004828fad6b9c7df317c0885cad82a65f4c8f01308cc
|
| 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 4, 2026.
Transparency logRelease files / bare_kit-0.2.0-py3-none-manylinux_2_34_aarch64.whl
| Download URL | bare_kit-0.2.0-py3-none-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 15.3 MB |
| Tags | Linux glibc 2.34+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
0d6dd38ea61264ea5eb7378b048940f853f23b0b9d42896de2e445a8d5253509
|
|
BLAKE2b-256 checksum How to use checksums |
04902abe75c18c6c6288327c81b3285d275920f086bb5018103762e084dde573
|
| 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 4, 2026.
Transparency logRelease files / bare_kit-0.2.0-py3-none-macosx_13_0_x86_64.whl
| Download URL | bare_kit-0.2.0-py3-none-macosx_13_0_x86_64.whl |
|---|---|
| Size | 15.7 MB |
| Tags | Python 3 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
95058e7ae09acbac18a1afb82ebff0b1e333a5e8c4de9724165048238813dba5
|
|
BLAKE2b-256 checksum How to use checksums |
85649ae54bf9ccd3ed257467580031c12333f0f8f296e91dcecbd524a0b40d90
|
| 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 4, 2026.
Transparency logRelease files / bare_kit-0.2.0-py3-none-macosx_13_0_arm64.whl
| Download URL | bare_kit-0.2.0-py3-none-macosx_13_0_arm64.whl |
|---|---|
| Size | 15.0 MB |
| Tags | Python 3 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3fd24ac3825eb1c5599c4081d0bc3d5b5a26bca4c3780542342fe803d82e90ee
|
|
BLAKE2b-256 checksum How to use checksums |
aad75e23405de312bb5e19616221f6da1517cd579ecf4089817735af3a67bafe
|
| 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 4, 2026.
Transparency logSecurity for bare-kit 0.2.0
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.
Attestation for bare_kit-0.2.0.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 4, 2026.
Transparency logA 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.