Skip to main content

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


Download files

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

Source Distribution

akebi-0.1.2.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

akebi-0.1.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file akebi-0.1.2.tar.gz.

File metadata

  • Download URL: akebi-0.1.2.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for akebi-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cc601b3a07a2829d7b6b2f6efd7d4e459779b3086102dae5de3e1bf729e666e3
MD5 036ac7c73bc5efe84ee0161ae3f3aa82
BLAKE2b-256 c8303264557df79208afff9154189e9daa884be96f2780b3b228ff34b8696da4

See more details on using hashes here.

Provenance

The following attestation bundles were made for akebi-0.1.2.tar.gz:

Publisher: release.yml on celsiusnarhwal/akebi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file akebi-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: akebi-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for akebi-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 580ec89e026ad5f854ea3f4a6c6dbd29e8717749e5d753af4b86e157b6855b5b
MD5 249e7b60308ce28148b6cc41574158cf
BLAKE2b-256 0e4718180e310f8d2210a7a3b172185ec8bb2fc8d17ffc458ba6f610a7c68d7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for akebi-0.1.2-py3-none-any.whl:

Publisher: release.yml on celsiusnarhwal/akebi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page