libsoulsearching
python virtual environment finder for most mainstream setups, after multiple projects of mine needed to dig through a venv
installation
pip install libsoulsearching
quickstart
from libsoulsearching import find_venv, find_all_venvs, ToolType
# find the first/best venv
info = find_venv("/path/to/project")
if info:
print(f"found {info.tool.value} venv at {info.venv_path}")
# find all venvs
all_venvs = find_all_venvs("/path/to/project")
for venv in all_venvs:
print(f"{venv.tool.value}: {venv.venv_path}")
# find specific tool only
poetry_venv = find_venv("/path/to/project", tool=ToolType.POETRY)
supported tools
-
poetry
poetry.lock,pyproject.tomlwith poetry config -
pipenv
pipfile.lock -
pdm
pdm.lock,.pdm.toml -
uv
uv.lock,.venv -
rye
rye.lock,.python-version -
hatch
pyproject.tomlwith[tool.hatch.envs] -
venv
.venv/pyvenv.cfg -
pyenv
.python-version
cli usage
# find first venv
venvfinder /path/to/project
# list all venvs
venvfinder /path/to/project --all
# find specific tool
venvfinder /path/to/project --tool poetry
# json output
venvfinder /path/to/project --json
api reference
-
libsoulsearching.find_venv()
find a virtual environment in the given project directory -
libsoulsearching.find_all_venvs()
find all virtual environments in the given project directory -
libsoulsearching.ToolType
enumeration of supported python environment management tools -
libsoulsearching.VenvInfo
information about a detected python virtual environment
def libsoulsearching.find_venv()
find a virtual environment in the given project directory
-
signature:
def find_venv( project_root: str | Path, tool: ToolType | None = None, ) -> VenvInfo | None: ...
-
arguments:
project_root: str | Path
path to the project directorytool: ToolType | None
specific tool to detect. if none, uses priority order
-
returns:
VenvInfo | None
venvinfo if a venv is found, none otherwise
def libsoulsearching.find_all_venvs()
find all virtual environments in the given project directory
returns all detected venvs in priority order, including potentially invalid ones (is_valid=false) if the tool's marker files exist but the actual venv is missing
-
signature:
def find_all_venvs(project_root: str | Path) -> list[VenvInfo]: ...
-
arguments:
project_root: str | Path
path to the project directory
-
returns:
list[VenvInfo]
list of venvinfo objects (may be empty)
class libsoulsearching.ToolType
enumeration of supported python environment management tools
- attributes:
POETRY: str
poetry package managerPIPENV: str
pipenv package managerPDM: str
pdm package managerUV: str
uv package managerRYE: str
rye package managerHATCH: str
hatch package managerVENV: str
standard venv modulePYENV: str
pyenv version managerENV_VAR: str
virtual environment from environment variable
class libsoulsearching.VenvInfo
information about a detected python virtual environment
- attributes:
tool: ToolType
the detected tool typevenv_path: Path | None
path to the virtual environment directorypython_executable: Path | None
path to the python executablepython_version: str | None
python version string (e.g., "3.10.5")is_valid: bool
whether the detected environment exists and is valid
licence
libsoulsearching is unencumbered, free-as-in-freedom, and is dual-licenced under
The Unlicense or the BSD Zero Clause License. (SPDX: Unlicense OR 0BSD)
you are free to use the software as you wish, without any restrictions or obligations, subject only to the warranty disclaimers in the licence text of your choosing.
Metadata
Release files for libsoulsearching 0.1.1
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 |
|---|---|---|---|---|
| libsoulsearching-0.1.1.tar.gz | 16.4 kB | Without provenance | Details for libsoulsearching-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libsoulsearching-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for libsoulsearching-0.1.1-py3-none-any.whl |
Total release size: 33.4 kB
Release files / libsoulsearching-0.1.1.tar.gz
| Download URL | libsoulsearching-0.1.1.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfd3db3bdffa99cfb9d550214ae2a4031422f6299740bb394d57f71ce7c1d7ce
|
|
BLAKE2b-256 checksum How to use checksums |
3c055fab6481245d979bacd2bcf6faf381f807c9888241e1aa7094f3e5901962
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / libsoulsearching-0.1.1-py3-none-any.whl
| Download URL | libsoulsearching-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9198fd6c574329f4478a9aa00120ce5b0bc432aaaf76f1b6cc99f9efb8c67f8a
|
|
BLAKE2b-256 checksum How to use checksums |
49dbac22baee35fafcaa0198a11230a5d69cad831015032a8ada6fede4659f15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for libsoulsearching 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.