Manage Bun installations from Python
Project description
Akebi
Akebi allows Python programs to manage Bun installations. It is intended for programs that need to install or run Node.js packages but do not wish to depend on the end user having an appropriate runtime or package manager installed.
Installation
pip install akebi
Usage
First, create an akebi.Bun object:
from akebi import Bun
bun = Bun()
bun = Bun(version="1.3.14") # use a specific version of Bun
bun = Bun(version="latest") # use the latest version of Bun
You can then invoke Bun by calling the Bun object you just created. A Bun object takes a subprocess.run-esque list or string
containing command-line arguments.
from akebi import Bun
bun = Bun()
bun(["run", "./my-script.ts"])
bun(["add", "next"])
bun(["create", "docusaurus"])
Akebi will automatically install Bun as necessary, but you can also install it manually with Bun.setup:
bun.setup()
# or, to forcibly overwrite existing installations of the same version:
bun.setup(force=True)
Under the hood, Akebi uses subprocess.run to invoke Bun. Keyword arguments passed to Bun objects will be passed
through to subprocess.run, e.g.:
bun("update tailwindcss", shell=True, capture_output=True, text=True)
Isolated installations
If you want to ensure the Bun installations used by your program aren't touched by anything else that uses
Akebi, you can set Bun.app_name:
bun = Bun(app_name="com.example.myapp")
Bun installations created by your program will be located under an app_name subdirectory. You should choose
an app name that's consistent within your program and not likely be taken by other programs that use
Akebi.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file akebi-0.1.0.tar.gz.
File metadata
- Download URL: akebi-0.1.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4c4c792bc5e6f0914dfdc9b327d798998a599086cd57bbfc5fe10e6572b077b
|
|
| MD5 |
309ff0f6d5ce2051d9eebfccbf538343
|
|
| BLAKE2b-256 |
135c2f7df9a432dec5abb95148d54f9d5effe9c6e149664697ec508b1d5e229b
|
Provenance
The following attestation bundles were made for akebi-0.1.0.tar.gz:
Publisher:
release.yml on celsiusnarhwal/akebi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akebi-0.1.0.tar.gz -
Subject digest:
c4c4c792bc5e6f0914dfdc9b327d798998a599086cd57bbfc5fe10e6572b077b - Sigstore transparency entry: 1926256667
- Sigstore integration time:
-
Permalink:
celsiusnarhwal/akebi@97d36066e6fdaef81b430404397edf034c930a0b -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/celsiusnarhwal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@97d36066e6fdaef81b430404397edf034c930a0b -
Trigger Event:
release
-
Statement type:
File details
Details for the file akebi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: akebi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a01c05872afec0f02ed52c2b0d4972e4b8a0e5cfff65e3a251f622473d85a498
|
|
| MD5 |
0f5dc17f6b866c686b5576a7a3a8e278
|
|
| BLAKE2b-256 |
827533a553f938bd5e4a6a3dbfea462db7155af76457a7b156f89c8ea0de8d53
|
Provenance
The following attestation bundles were made for akebi-0.1.0-py3-none-any.whl:
Publisher:
release.yml on celsiusnarhwal/akebi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akebi-0.1.0-py3-none-any.whl -
Subject digest:
a01c05872afec0f02ed52c2b0d4972e4b8a0e5cfff65e3a251f622473d85a498 - Sigstore transparency entry: 1926256819
- Sigstore integration time:
-
Permalink:
celsiusnarhwal/akebi@97d36066e6fdaef81b430404397edf034c930a0b -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/celsiusnarhwal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@97d36066e6fdaef81b430404397edf034c930a0b -
Trigger Event:
release
-
Statement type: