Ephemeral package execution for conda -- run any conda package without installing it
Project description
conda-exec
Ephemeral package execution for conda. Run commands from conda packages without installing them 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 reused on later runs but is not added to
PATH permanently.
Installation
conda install -c conda-forge conda-exec
Install conda-pypi for scripts with PyPI dependencies, and
conda-lockfiles for script lock support.
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
# Record a repeatable script environment
conda exec --lock script.py
# Force re-creation of cached environment
conda exec --refresh ruff check .
How it works
- Computes a cache key from the tool name, specs, and channels
- Checks
~/.conda/exec/envs/for a cached environment - On cache miss: solves and installs via conda's configured solver backend
- Finds the binary in the environment's
bin/directory - Runs it directly via
subprocess.runwith PATH prepended - Forwards the tool's exit code
Documentation
Full documentation at conda-incubator.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
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 conda_exec-0.3.0.tar.gz.
File metadata
- Download URL: conda_exec-0.3.0.tar.gz
- Upload date:
- Size: 10.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2669a204c55b1c9a70305dd3fb5b69da7e868dcdf676a503014d6000c4a3cf0f
|
|
| MD5 |
d51bb13c0decbcd1b219b0c15ce7bb41
|
|
| BLAKE2b-256 |
3bc165955f5bb3c73f0db1df29a4cacf951f99159a73981bded48dd113992a02
|
Provenance
The following attestation bundles were made for conda_exec-0.3.0.tar.gz:
Publisher:
release.yml on conda-incubator/conda-exec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
conda_exec-0.3.0.tar.gz -
Subject digest:
2669a204c55b1c9a70305dd3fb5b69da7e868dcdf676a503014d6000c4a3cf0f - Sigstore transparency entry: 1819512146
- Sigstore integration time:
-
Permalink:
conda-incubator/conda-exec@341d8b52e70ccf92053521a315f27f9939df92e4 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/conda-incubator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@341d8b52e70ccf92053521a315f27f9939df92e4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file conda_exec-0.3.0-py3-none-any.whl.
File metadata
- Download URL: conda_exec-0.3.0-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac3b0a0bde0fed74f61c90c410ced316fcb601612152217ff563304d3daf5035
|
|
| MD5 |
7ff4eda9e3cbe93f2378e2c8ba76c4c8
|
|
| BLAKE2b-256 |
569f360924a45d29604007955f470458506a86393d4cbdafb61e1972056341ea
|
Provenance
The following attestation bundles were made for conda_exec-0.3.0-py3-none-any.whl:
Publisher:
release.yml on conda-incubator/conda-exec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
conda_exec-0.3.0-py3-none-any.whl -
Subject digest:
ac3b0a0bde0fed74f61c90c410ced316fcb601612152217ff563304d3daf5035 - Sigstore transparency entry: 1819512182
- Sigstore integration time:
-
Permalink:
conda-incubator/conda-exec@341d8b52e70ccf92053521a315f27f9939df92e4 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/conda-incubator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@341d8b52e70ccf92053521a315f27f9939df92e4 -
Trigger Event:
release
-
Statement type: