PyPIMap

mcp
Security Audit
Warn
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 7 GitHub stars
Code Warn
  • network request — Outbound network request in frontend/src/api/client.js
  • network request — Outbound network request in frontend/src/api/galaxy.js
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Daily-updated PyPI dependency graph and open dataset (DuckDB/PostgreSQL ETL from PyPIStats BigQuery), plus a public API and MCP server.

README.md

PyPiMap

An interactive map of the Python package dependency ecosystem.

🔗 pypimap.com


Architecture

PyPIMap architecture

More detail: docs/project-map.md.


What is PyPiMap?

PyPiMap shows PyPI packages on a Galaxy map. You can also open an Explorer graph for one package.

Search or select a package to see:

  • what it Depends on
  • what Used by it
  • core vs optional links
  • basic package metadata

Data updates every day. Full history is also on Kaggle (DOI 10.34740/kaggle/dsv/23192616).

Credits

The Galaxy zoom/pin feel is inspired by Open Model Family Tree / Model Galaxy. PyPIMap is about package dependencies, not AI model lineage.

Features

  • Galaxy map - zoom and search across many packages
  • Explorer graph - Depends on / Used by, core vs optional
  • Expand / recenter - keep exploring without losing place
  • Package metadata - including importance_score and PEP 440 active_version
  • Daily ETL - plus public Parquet / Kaggle data
  • Hosted MCP for AI agents: pypimap.com/mcp

Tech Stack

  • Frontend: React, Vite, Tailwind CSS, Zustand; Galaxy map + react-force-graph-2d (Explorer)
  • Backend: FastAPI, PostgreSQL
  • Pipeline: DuckDB + PostgreSQL ETL; Galaxy tiles after each load
  • Infra: Hetzner, Cloudflare, Caddy; Docker Compose or Podman Compose
  • MCP: mcp/ at https://mcp.pypimap.com/mcp

MCP (agents)

Tools: search_packages, package_info, package_depends_on, package_used_by, last_update.

Pick A or B (details: pypimap.com/mcp):

  • A. Hosted URL (streamable HTTP): https://mcp.pypimap.com/mcp - when the AI product has remote MCP / server URL
  • B. Local stdio: install from mcp/README.md - Cursor, Claude Desktop, and similar

No MCP in the product -> use the public JSON API.

Data Pipeline

PyPiMap uses an automated data pipeline to collect, process, and publish package ecosystem data.

At a high level:

PyPIStats / PyPI
       ↓
Daily ETL
       ↓
Generated Parquet data
       ↓
PostgreSQL
       ↓
PyPiMap API
       ↓
Interactive frontend

The ETL process generates updated Parquet files daily. The latest generated files are published to the daily_parquet_after_etl branch.

The daily_parquet_after_etl branch contains the latest Parquet files generated by the daily ETL pipeline. It is intentionally separate from the application's development and release branches and is updated as new ETL runs complete.

The PyPiMap Kaggle dataset is generated daily from the latest Parquet files pulled from this branch. It contains the full raw Parquet data as well as processed datasets designed for analysis and graph/ML use cases.

The generated data may be periodically promoted into the application as part of the normal development/release process.

Active version and upload dates

When the ETL builds each package’s current row in pypi.metadata, two fields are chosen independently:

Field Meaning How it is chosen
active_version Active / displayed version (aligned with the PyPI project page) Highest version under PEP 440, preferring a final release when any exist
last_upload_date Most recent upload activity max(upload_date) across all releases of that package
first_upload_date First seen upload min(upload_date)

active_version sort key (applied in pipeline/sql/duckdb_to_pg.sql and duckdb_to_pg_migration.sql):

  1. Prefer a non-prerelease, non-dev version if the package has one (same idea as PyPI’s project-page “latest”; see PEP 440 final releases vs pre-releases / developmental releases).
  2. Higher epoch wins (N!…; PEP 440 version epochs).
  3. Higher release segment wins as integer parts (1.10 > 1.9; PEP 440 release segment).
  4. Among pre-releases: no pre > rc > b > a, then higher pre number (PEP 440 pre-release separators).
  5. A post release sorts after the same version without post (PEP 440 post-releases).
  6. A version without .dev sorts after one with .dev at the same base (PEP 440 developmental releases).
  7. Tie-break only: newer upload_date, then inserted_at.

So a newer-dated backport or .dev upload can update last_upload_date without changing active_version. Dependency edges for the package use requires_dist from the PEP 440-selected version.

Data Sources & Attribution

PyPiMap is built on top of:

  • PyPIStats distribution metdata from the Google BigQuery public dataset.
  • PyPI using PyPI Simple API for validating active packages.

Note: Data stored in this repository may not represent the latest daily dataset. The daily_parquet_after_etl branch contains the latest ETL-generated Parquet files. The PyPiMap Kaggle dataset is generated daily from these files and provides both the full raw data and processed datasets for analysis and graph/ML use cases.

Dataset DOI: 10.34740/kaggle/dsv/23192616. Use this DOI when citing the dataset in academic work.


Getting Started

  git clone https://github.com/naelaqel/pypimap.git
  cd pypimap
  docker compose up --build

Same docker-compose.yml works with Podman: podman compose up --build (or podman-compose).

Then open http://localhost:3000 in your browser.

For local frontend development with hot-reload, see the Local Frontend Development section in CONTRIBUTING.md.

See CONTRIBUTING.md for full development setup and contribution guidelines.

Environment Configuration

PyPiMap uses environment variables for database, API, frontend, pipeline, and
external service configuration.

For local development, copy the example environment file and adjust the values
as needed:

  cp .env.example .env

The .env.example file documents the available configuration variables,
including:

  • PostgreSQL connection and credential settings
  • Backend and frontend ports
  • Allowed CORS origins
  • Frontend API URL
  • Google Cloud credentials for BigQuery access
  • GitHub App credentials used by the ETL pipeline

Some settings are only required when running specific parts of the pipeline
or connecting to external services. For a basic local application setup, use
the local PostgreSQL and API/frontend defaults provided in .env.example.

Project Structure

backend/        FastAPI backend and API
frontend/       React frontend
pipeline/       ETL pipeline and database loading

The project is divided into three main parts:

  • Frontend the interactive PyPiMap web application
  • Backend API and database access
  • Pipeline data extraction, transformation, and loading

API

The backend provides API endpoints for package search, package information, dependency relationships, and graph data.

The interactive API documentation is available when running the backend locally through FastAPI's generated API documentation.

Data Freshness

PyPiMap's data is refreshed daily through the automated ETL pipeline.

Because the pipeline runs periodically, the information shown on PyPiMap may not immediately reflect changes that were made on PyPI.

The latest generated dataset is published to the daily_parquet_after_etl branch and synchronized with the Kaggle dataset.

Contributing

Contributions are welcome.

The development workflow is:

feature/fix branch
        ↓
       dev
        ↓
     release
        ↓
      main
  • Create feature and fix branches from dev.
  • Open pull requests against dev.
  • dev is the main integration/development branch.
  • main contains stable released versions.
  • daily_parquet_after_etl is reserved for generated ETL data and is not part of the normal feature/fix workflow.

See CONTRIBUTING.md for the full development setup, branching strategy, and contribution guidelines.

License

This project is licensed under the MIT License.

Author

Built and maintained by Nael Aqel.

GitHub · LinkedIn · Kaggle · Website

Support

If you find PyPiMap useful, consider supporting its development and hosting costs:

Support via PayPal

Reviews (0)

No results found