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.0.tar.gz (135.1 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.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pkgq-0.1.0.tar.gz
  • Upload date:
  • Size: 135.1 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.0.tar.gz
Algorithm Hash digest
SHA256 add7c300a96a806be99cbc904f1ffe32dede318d2d8e2fed91b3004db4bc754d
MD5 757a75320675bc1c24ce9675c563ed72
BLAKE2b-256 cfb715cd106307a5b5e463b815ff302db6fd9d6417a96e8ea600530ccd43d6c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pkgq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1754cd469aa873d03ca4524eac05d829782729b2ae3fd0e0c6515a3f778f9ffc
MD5 1936a5eea461d39dac6e67a5e423c879
BLAKE2b-256 dac78501ea496405cf6d3617d4bb51c8f89f3fdefc216ca73e57db693834bfa4

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