Skip to main content

Ephemeral package execution for conda -- run any conda package without installing it

Project description

conda-exec

Tests Documentation License: BSD-3-Clause Python: 3.10+ Benchmarks zizmor

Ephemeral package execution for conda. Run any conda package without installing it permanently.

conda exec ruff check .
ce ruff check .

conda-exec creates a cached, isolated environment for the tool, runs it, and exits. The environment is cached for fast re-use but is not on PATH and is fully disposable. Think npx for Node or uvx for Python, but for conda packages.

Installation

conda install conda-exec

Requires conda-rattler-solver for fast environment creation.

Usage

# Run a tool (creates cached environment on first use)
conda exec ruff check .
ce ruff check .               # standalone alias

# Pin a version
conda exec "ruff>=0.4,<0.5" check .

# Add extra packages
conda exec --with pytest ruff check .
conda exec --with "python=3.12" jupyter lab

# Use a specific channel
conda exec -c bioconda samtools view file.bam

# Run a script with inline dependencies (PEP 723)
conda exec script.py

# Force re-creation of cached environment
conda exec --refresh ruff check .

How it works

  1. Computes a cache key from the tool name, specs, and channels
  2. Checks ~/.conda/exec/envs/ for a cached environment
  3. On cache miss: solves and installs via conda-rattler-solver
  4. Finds the binary in the environment's bin/ directory
  5. Runs it directly via subprocess.run with PATH prepended
  6. Forwards the tool's exit code

Documentation

Full documentation at jezdez.github.io/conda-exec.

Contributing

pixi install
pixi run check          # lint + format + typecheck
pixi run -e test test   # run tests

License

BSD-3-Clause

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

conda_exec-0.1.1.tar.gz (68.5 kB view details)

Uploaded Source

Built Distribution

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

conda_exec-0.1.1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file conda_exec-0.1.1.tar.gz.

File metadata

  • Download URL: conda_exec-0.1.1.tar.gz
  • Upload date:
  • Size: 68.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for conda_exec-0.1.1.tar.gz
Algorithm Hash digest
SHA256 90350002af7ad51b46795b5e39b986ae55d82d9c9c932d7572c41013be373455
MD5 531049b808416305b4b8a401ccfe1e66
BLAKE2b-256 4560a65418247f8256ba34a983e900d9dc95eaecd3b22972a0fe510fd5d0e15a

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_exec-0.1.1.tar.gz:

Publisher: release.yml on jezdez/conda-exec

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

File details

Details for the file conda_exec-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: conda_exec-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for conda_exec-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f7fbca80a0ea412c2a2be6c5399bfd11ed0c3fbf293c00649fdc86464c90797
MD5 9222099be1b951e48b04b8701dc00ef7
BLAKE2b-256 71cef506a114878292ee157c73adbfb6645447e2486c0d498b778a81f882e476

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_exec-0.1.1-py3-none-any.whl:

Publisher: release.yml on jezdez/conda-exec

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