Search PyPI package names by regex pattern, with caching and optional details.
Project description
pypi-search-caching
Adds the command: pypi_search
- Current Version: 0.0.5a1
Search PyPI package names by regex pattern 🐍📦
Fast, cached regex search over all PyPI packages (~736k+), with optional details (version, maintainer, description).
{width=100}
Features
- Regex matching (e.g.,
^aio.*,flask|django). - Access to pypi.org packages via the simple package API
- ~23h TTL for package names (
~/.cache/pypi_search/) - 7d LMDB caching for details
- ~23h TTL for package names (
- Color output to console
LMDB caching for details, tqdm progress, test_mode for CI.
Program Options
usage: pypi_search [-h] [--version] [-i] [-d] [--count-only] [-r] [-f] [--test_mode] pattern
positional arguments:
pattern Regular expression to match package names (required)
options:
-h, --help show this help message and exit
--version, -V show program's version number and exit
-i, --ignore-case Case-insensitive matching
--desc, -d Fetch and show detailed info for first 10 matches
--count-only Only show count of matches
--refresh-cache, -r Refresh the PyPI cache now. Happens before search.
--full-desc, -f Include full description in details (with -d)
--test_mode Use logger.info for progress instead of tqdm bars (for non-interactive/tests)
Installation
# Using pip
pip install pypi-search-caching
# Using uv
uv pip install pypi-search-caching
- Installs
pypi_searchcommand to~/.local/bin(pip) or your virtual environment's bin (uv).
Usage Examples
Basic search
pypi_search "^aio"
Searches for packages starting with "aio" using cached names.
With details
pypi_search "flask|django" -d
Shows details (version, homepage, etc.) for the first 10 matches.
Refresh cache
pypi_search "pattern" -r
Refreshes the package names cache before searching.
Test mode
pypi_search "^aio" --test_mode
Uses logging for progress instead of tqdm bars, useful for CI or non-interactive environments (shows logs).
Progress bars (tqdm) appear during long fetches like details or filtering; caching (~23h TTL for names, 7d for details via LMDB). Use --test_mode for non-interactive/tests.
Filter by description
pypi_search "aio" --search "async" --count-only
Counts packages matching "aio" whose long descriptions contain "async".
Searching Descriptions (Torch Example)
pypi_search '^torch.*' -s 'image'
Searches for torch packages and filters descriptions containing 'image'. Caches long descriptions for subsequent faster searches.
pypi_search '^torch.*' -s 'image' -d -f'
Subsequently, display summary and full long description (from cache) for matching modules.
My Dev Environment:
- Python Env: uv
- IDE: JetBrains PyCharm
- AI Agent Env:
- Aider
- Aider-Desk
- Junie
Feedback
- Let me know what you think. Please post bug, suggestions, and wins from using pypi_search. I'd really appreciate it.
- Links
Licence
MIT License. Built with Requests + BeautifulSoup.
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 pypi_search_caching-0.0.5a1.tar.gz.
File metadata
- Download URL: pypi_search_caching-0.0.5a1.tar.gz
- Upload date:
- Size: 441.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc5817448ea09e10f32b7d5801f772dbb16b9f0e184b98629f88d23b33d3a6bf
|
|
| MD5 |
fc2a64c85b94c78559e0a1e871dddf79
|
|
| BLAKE2b-256 |
34ae85b17e1e712174221829f971609295224242397a3516a7fa7422db17f3c9
|
Provenance
The following attestation bundles were made for pypi_search_caching-0.0.5a1.tar.gz:
Publisher:
python-publish.yml on dsidlo/pypi_search
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypi_search_caching-0.0.5a1.tar.gz -
Subject digest:
fc5817448ea09e10f32b7d5801f772dbb16b9f0e184b98629f88d23b33d3a6bf - Sigstore transparency entry: 947223919
- Sigstore integration time:
-
Permalink:
dsidlo/pypi_search@ca57bbd410e9f1b42dae01075b5bd081628eef29 -
Branch / Tag:
refs/tags/0.0.5a1 - Owner: https://github.com/dsidlo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ca57bbd410e9f1b42dae01075b5bd081628eef29 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pypi_search_caching-0.0.5a1-py3-none-any.whl.
File metadata
- Download URL: pypi_search_caching-0.0.5a1-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
023f76e96d0ccc765671631e204331364802d8bb9ff14309fd96074ff1df5719
|
|
| MD5 |
e5085af47c44897ea3d0d37ee4ed1213
|
|
| BLAKE2b-256 |
47addc2cd5416d739b968763bc5a405c399d59da10677db250e66e2ee9971d06
|
Provenance
The following attestation bundles were made for pypi_search_caching-0.0.5a1-py3-none-any.whl:
Publisher:
python-publish.yml on dsidlo/pypi_search
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypi_search_caching-0.0.5a1-py3-none-any.whl -
Subject digest:
023f76e96d0ccc765671631e204331364802d8bb9ff14309fd96074ff1df5719 - Sigstore transparency entry: 947223923
- Sigstore integration time:
-
Permalink:
dsidlo/pypi_search@ca57bbd410e9f1b42dae01075b5bd081628eef29 -
Branch / Tag:
refs/tags/0.0.5a1 - Owner: https://github.com/dsidlo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ca57bbd410e9f1b42dae01075b5bd081628eef29 -
Trigger Event:
release
-
Statement type: