Metadata-Version: 2.3
Name: pse
Version: 0.1.3
Summary: Search Python packages across PyPI, Conda channels, and compatible indexes.
Keywords: python,package,search,pypi,conda
Author: mdonmez
Author-email: mdonmez <124686256+mdonmez@users.noreply.github.com>
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/mdonmez/pse
Project-URL: Repository, https://github.com/mdonmez/pse
Project-URL: Issues, https://github.com/mdonmez/pse/issues
Description-Content-Type: text/markdown

# pse — Python Search Engine

_Find Python packages across PyPI, Conda channels, and other compatible indexes._

pse is a cross-source command-line Python package search tool. It searches Python
packages without installing packages or using a package manager at runtime.

## Features

- Search PyPI by default, or select exact PyPI and Conda sources.
- Detect PyPI-compatible indexes and Conda channels from source URLs.
- Produce human-readable tables or structured JSON.

## Usage

### Using `pse` on-the-fly

You can run `pse` directly with `uvx`, `pipx` or `pixi exec` without a permanent install.

<details>
<summary>uvx</summary>

```powershell
uvx pse pkg
```

</details>

<details>
<summary>pipx</summary>

```powershell
pipx run pse pkg
```

</details>

<details>
<summary>pixi exec</summary>

```powershell
pixi exec -s uv uvx pse pkg
```

</details>

### Installing `pse` for repeated use

You can install `pse` as global command with `uv tool install` for repeated use:

```powershell
uv tool install pse
pse pkg
```

## Use-cases

Search PyPI by default:

```powershell
pse pkg
```

Search only conda-forge:

```powershell
pse pkg --source conda-forge
```

Search a PyPI-compatible source URL:

```powershell
pse pkg --source https://download.pytorch.org/whl/cu126
```

Search a Conda channel URL:

```powershell
pse pkg --source https://conda.anaconda.org/bioconda
```

Use multiple exact sources:

```powershell
pse pkg --source pypi --source conda-forge --source https://download.pytorch.org/whl/cu126
```

## Sources

### PyPI

pse searches the [PyPI Simple API](https://pypi.org/simple/) by default. The
`pypi` source name and source URLs that expose a compatible Simple index, such
as the PyTorch wheel index, use the PyPI adapter.

### Conda

pse searches Conda only when `conda-forge` or a detected Conda source URL is
selected. It reads current_repodata.json.bz2 for the selected channel and
platform, and also searches noarch unless the requested platform is already
noarch.

The built-in `conda-forge` source maps to conda.anaconda.org. Full channel URLs
are detected automatically; source URLs must point to channel roots.

The reduced current_repodata metadata is fast, but it may not contain every
historical Conda package version.

## JSON output

`pse` can produce structured JSON output for programmatic consumption and agent friendly use. The JSON output contains a `results` array with one entry per source. Each entry contains the source name, package name, and an array of available versions:

```json
{
  "query": "torch",
  "platform": "win-64",
  "results": [
    {
      "source": "pypi",
      "name": "torch",
      "versions": [
        {
          "version": "2.13.0",
          "build": null,
          "platform": null
        }
      ]
    }
  ]
}
```

If a source fails, an errors array is added to the document.
