Skip to main content

Package Query - Find API information for Python packages

Project description

pkgq

PacKaGe Query - Find API information for Python packages.

A fast, agent-friendly tool for discovering Python package documentation, capabilities, and migration guides.

Installation

# Install with uv
uv add pkgq

# Or with pip
pip install pkgq

# For MCP server support
uv add "pkgq[mcp]"

Usage

Python Module

from pkgq import find

# Find package documentation
result = find("yoker")
print(result.content)

# Find specific version
result = find("yoker", version="2.1.0")

# Check for updates
result = find("yoker", from_version="1.5.0")
if result.version != "1.5.0":
    print(f"Update available: {result.version}")

# Save to cache
result.save_to_cache()

Command Line

# Find package documentation
pkgq find yoker

# Find specific version
pkgq find yoker --version 2.1.0

# Check for updates
pkgq find yoker --from-version 1.5.0

# Save to cache
pkgq find yoker --save

# Output as JSON
pkgq find yoker --json

# Manage cache
pkgq cache --list
pkgq cache --clear
pkgq cache --dir

MCP Server

# Run MCP server
pkgq-mcp-server

# Or with uvx
uvx --from pkgq pkgq-mcp-server

The MCP server provides a find_package tool for use with Claude Code and other MCP-compatible agents.

Cache

Package documentation is cached locally:

  • Default: ~/.cache/pkgq/packages/
  • Custom: Set PKGQ_CACHE environment variable

Cache structure:

~/.cache/pkgq/packages/
├── yoker/
│   ├── PACKAGE.md      # Package documentation
│   └── metadata.json   # Version and source info
└── roomz/
    ├── PACKAGE.md
    └── metadata.json

Development

# Clone repository
git clone https://github.com/christophevg/pkgq.git
cd pkgq

# Install dependencies
uv sync

# Run tests
uv run pytest

# Run linter
uv run ruff check src/

# Run MCP server
uv run pkgq-mcp-server

License

MIT License - See LICENSE for details.

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

pkgq-0.1.1.tar.gz (135.2 kB view details)

Uploaded Source

Built Distribution

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

pkgq-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pkgq-0.1.1.tar.gz
  • Upload date:
  • Size: 135.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pkgq-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bbf3bdcd568bde81437dc72c9d3f69b526214f72cdcf87d51ca0feda451f51a9
MD5 dc0c2ad4d6953e298f76017673a6f723
BLAKE2b-256 1621fd3f3c28497ca9c7ad5afd8a187e778ffc91e93a6885ce21446b4b14f425

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pkgq-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pkgq-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20d881122ddfcccb4d7524b52b7958619a0e4dbf0a3e0b29bb163a7e7c686bb9
MD5 79703280fa18c1f11ad75fbd460c4452
BLAKE2b-256 03956b20fc7aa01e577617189d67f2204c9181829b5264442f5c790b8d40b1f7

See more details on using hashes here.

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