A package to analyze PyPI package API evolution and lifecycle
Project description
PyPevol - Python Package Evolution Analysis Tool
A comprehensive tool for analyzing PyPI package API evolution and lifecycle. This package fetches information from PyPI, analyzes wheels and sources, and provides detailed reports about when APIs were introduced and removed across different versions.
Features
- PyPI Integration: Fetch package metadata and releases from PyPI
- Wheel Analysis: Download and analyze wheel files to extract API information
- Source Code Analysis: Parse Python source code to identify APIs
- Evolution Tracking: Track API changes across package versions
- Visualization: Generate interactive reports and visualizations
- CLI Interface: Easy-to-use command-line interface
- Web Dashboard: Interactive web interface for exploring results
Installation
pip install pypevol
For development:
pip install -e ".[dev]"
Quick Start
Command Line Usage
# Analyze a single package
pypevol analyze requests
# Analyze with specific version range
pypevol analyze requests --from-version 2.20.0 --to-version 2.28.0
# Generate HTML report
pypevol analyze requests --output report.html --format html
# Analyze multiple packages
pypevol analyze requests flask django --output results/
Python API Usage
from pypevol import PackageAnalyzer
# Create analyzer
analyzer = PackageAnalyzer()
# Analyze package evolution
result = analyzer.analyze_package('requests')
# Get API changes
api_changes = result.get_api_changes()
# Generate report
report = result.generate_report(format='html')
API Evolution Analysis
PyPevol tracks the following API elements:
- Functions: Top-level and module functions
- Classes: Class definitions and inheritance
- Methods: Instance and class methods
- Properties: Class properties and descriptors
- Constants: Module-level constants
- Type Hints: Type annotations and their evolution
Output Formats
- JSON: Machine-readable format for further processing
- HTML: Interactive web report with visualizations
- CSV: Tabular format for spreadsheet analysis
- Markdown: Human-readable documentation format
Configuration
Create a .pypevol.yaml configuration file:
# Package analysis settings
analysis:
include_private: false
include_deprecated: true
max_versions: 50
# Output settings
output:
default_format: html
include_source_links: true
show_usage_examples: true
# Caching settings
cache:
enabled: true
directory: ~/.pypevol/cache
max_size: 1GB
Examples
See the examples/ directory for detailed usage examples and tutorials.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run the test suite:
pytest - Submit a pull request
License
MIT License - see LICENSE file for details.
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 pypevol-0.2.0.tar.gz.
File metadata
- Download URL: pypevol-0.2.0.tar.gz
- Upload date:
- Size: 848.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a8455ccec714a09f60840e670415266f1de9abd225f8e5c34ca8dae7a0ef262
|
|
| MD5 |
81d8fb9f55e884708291d6aceb53ed3b
|
|
| BLAKE2b-256 |
37064087c95701aef98bee0a4685f3ff2851a70ae55723d3af560e19ca29136e
|
File details
Details for the file pypevol-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pypevol-0.2.0-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
888873c7167c0e45a14b65fbdbe8f997008da0f41e6fbd8c3f28622eb6d76fdd
|
|
| MD5 |
f28f8b63308002094ec160a22a3cf9bb
|
|
| BLAKE2b-256 |
fa43f5c6c412b9ed3d921e18b6689f009e30447dafc888e742fdd294e27674e4
|