
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
vtk-python-docs
Advanced tools
A Python package for extracting VTK documentation, generating enhanced Python stubs, and creating markdown API documentation.
git clone <repository-url>
cd vtk-python-docs
./setup.sh
This creates a virtual environment and installs the package in editable mode.
For AI-powered classification (synopsis, role, visibility), copy .env.example to .env and configure your LLM provider:
cp .env.example .env
# Edit .env with your API key
Supported providers via LiteLLM:
gpt-4o-mini, gpt-4oclaude-3-haiku-20240307, claude-3-5-sonnet-20241022ollama/llama3.2, ollama/mistralgemini/gemini-1.5-flashIf no LLM is configured, classification metadata will be skipped.
source .venv/bin/activate
vtk-docs build
This generates all outputs (~35 seconds without LLM, longer with LLM due to rate limiting):
docs/vtk-python-docs.jsonl - JSONL databasedocs/python-stubs-enhanced/ - Enhanced Python stubsdocs/python-api/ - Markdown documentationvtk-docs --help # Show all commands
vtk-docs build # Run complete build pipeline
vtk-docs extract # Extract VTK documentation to JSONL
vtk-docs stubs # Generate and enhance Python stubs
vtk-docs markdown # Generate markdown documentation
vtk-docs clean # Clean generated files
vtk-docs stats # Show database statistics
vtk-docs search <query> # Search the documentation
vtk-docs search vtkActor # Search by class name
vtk-docs search Render -f synopsis # Search in synopsis field
vtk-docs search Core -f module_name -n 20 # Search modules, show 20 results
from vtk_python_docs.build import build_all
# Run full build
build_all()
# Or use individual components
from vtk_python_docs.extract import extract_all
from vtk_python_docs.stubs import generate_all as generate_stubs
from vtk_python_docs.markdown import generate_all as generate_markdown
from vtk_python_docs.config import get_config
config = get_config()
extract_all(config)
generate_stubs(config)
generate_markdown(config)
import json
from pathlib import Path
# Stream through JSONL database
for line in open('docs/vtk-python-docs.jsonl'):
record = json.loads(line)
if 'Actor' in record['class_name']:
print(f"{record['class_name']}: {record.get('synopsis', '')}")
docs/
├── vtk-python-docs.jsonl # All VTK classes (JSONL format)
├── python-stubs-enhanced/ # Enhanced .pyi stub files
│ ├── vtkCommonCore.pyi
│ └── ... (150+ modules)
└── python-api/ # Markdown documentation
├── index.md
└── vtkCommonCore/
├── index.md
└── vtkObject.md
vtk-python-docs/
├── pyproject.toml
├── setup.sh
├── tests/ # pytest test suite
└── vtk_python_docs/
├── __init__.py
├── cli.py # Typer CLI
├── config.py # Centralized configuration
├── build.py # Build pipeline orchestrator
├── extract/ # VTK documentation extraction
├── stubs/ # Stub generation & enhancement
└── markdown/ # Markdown generation
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run tests with coverage
pytest tests/ --cov=vtk_python_docs
# Lint code
ruff check vtk_python_docs/
# Type check
pyright vtk_python_docs/
| Variable | Description | Default |
|---|---|---|
LLM_MODEL | LiteLLM model identifier | (none) |
OPENAI_API_KEY | OpenAI API key | (none) |
ANTHROPIC_API_KEY | Anthropic API key | (none) |
GEMINI_API_KEY | Google Gemini API key | (none) |
LLM_RATE_LIMIT | Requests per minute | 60 |
LLM_MAX_CONCURRENT | Max concurrent requests | 10 |
This project enhances the official VTK Python bindings. Please refer to VTK's licensing terms for the underlying VTK library.
FAQs
VTK Python documentation extraction, stub enhancement, and API generation
We found that vtk-python-docs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.