cat << 'EOF' > .gitignore
# Python bytecode and caches
__pycache__/
*.py[cod]
*$py.class
*.so

# Distribution / packaging
dist/
build/
*.egg-info/

# Virtual environments
.venv/
env/
venv/

# IDEs
.vscode/
.idea/
.DS_Store
EOF