2025-05-27 11:14:49 +08:00
|
|
|
"""MCP tools for PyPI package queries.
|
|
|
|
|
|
|
|
|
|
This package contains the FastMCP tool implementations that provide
|
|
|
|
|
the user-facing interface for PyPI package operations.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from .compatibility_check import (
|
|
|
|
|
check_python_compatibility,
|
|
|
|
|
get_compatible_python_versions,
|
|
|
|
|
suggest_python_version_for_packages,
|
|
|
|
|
)
|
2025-05-27 18:02:45 +08:00
|
|
|
from .dependency_resolver import resolve_package_dependencies
|
2025-05-27 19:23:35 +08:00
|
|
|
from .download_stats import (
|
|
|
|
|
get_package_download_stats,
|
|
|
|
|
get_package_download_trends,
|
|
|
|
|
get_top_packages_by_downloads,
|
|
|
|
|
)
|
2025-05-27 18:02:45 +08:00
|
|
|
from .package_downloader import download_package_with_dependencies
|
2025-05-27 11:14:49 +08:00
|
|
|
from .package_query import (
|
|
|
|
|
query_package_dependencies,
|
|
|
|
|
query_package_info,
|
|
|
|
|
query_package_versions,
|
|
|
|
|
)
|
feat: add comprehensive PyPI search functionality with advanced filtering
- Implemented PyPISearchClient with semantic search, filtering, and sorting
- Added 4 new search tools: search_packages, search_by_category, find_alternatives, get_trending_packages
- Created SearchFilter and SearchSort classes for flexible configuration
- Added SearchError exception for search-specific error handling
- Comprehensive test suite with 13 tests covering all search functionality
- Enhanced MCP server with 4 new search endpoints
- Support for filtering by Python version, license, category, downloads, maintenance status
- Multiple sorting options: relevance, popularity, quality, recency, name, downloads
- Semantic search using description similarity scoring
- Category-based package discovery with intelligent keyword matching
- Package alternatives finder using metadata analysis
- Trending packages analysis with download activity tracking
- Robust fallback mechanisms using curated package database
- All tests passing (13/13)
This implements feature #6 from the roadmap: "Advanced PyPI Search with filtering by Python version, license, maintenance status and sorting by popularity, recency, quality score with semantic search capabilities"
2025-08-16 07:45:40 -06:00
|
|
|
from .search import (
|
|
|
|
|
find_alternatives,
|
|
|
|
|
get_trending_packages,
|
|
|
|
|
search_by_category,
|
|
|
|
|
search_packages,
|
|
|
|
|
)
|
2025-05-27 11:14:49 +08:00
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
"query_package_info",
|
|
|
|
|
"query_package_versions",
|
|
|
|
|
"query_package_dependencies",
|
|
|
|
|
"check_python_compatibility",
|
|
|
|
|
"get_compatible_python_versions",
|
|
|
|
|
"suggest_python_version_for_packages",
|
2025-05-27 18:02:45 +08:00
|
|
|
"resolve_package_dependencies",
|
|
|
|
|
"download_package_with_dependencies",
|
2025-05-27 19:23:35 +08:00
|
|
|
"get_package_download_stats",
|
|
|
|
|
"get_package_download_trends",
|
|
|
|
|
"get_top_packages_by_downloads",
|
feat: add comprehensive PyPI search functionality with advanced filtering
- Implemented PyPISearchClient with semantic search, filtering, and sorting
- Added 4 new search tools: search_packages, search_by_category, find_alternatives, get_trending_packages
- Created SearchFilter and SearchSort classes for flexible configuration
- Added SearchError exception for search-specific error handling
- Comprehensive test suite with 13 tests covering all search functionality
- Enhanced MCP server with 4 new search endpoints
- Support for filtering by Python version, license, category, downloads, maintenance status
- Multiple sorting options: relevance, popularity, quality, recency, name, downloads
- Semantic search using description similarity scoring
- Category-based package discovery with intelligent keyword matching
- Package alternatives finder using metadata analysis
- Trending packages analysis with download activity tracking
- Robust fallback mechanisms using curated package database
- All tests passing (13/13)
This implements feature #6 from the roadmap: "Advanced PyPI Search with filtering by Python version, license, maintenance status and sorting by popularity, recency, quality score with semantic search capabilities"
2025-08-16 07:45:40 -06:00
|
|
|
"search_packages",
|
|
|
|
|
"search_by_category",
|
|
|
|
|
"find_alternatives",
|
|
|
|
|
"get_trending_packages",
|
2025-05-27 11:14:49 +08:00
|
|
|
]
|