How to create a via in KiCad using Python?
To create a via in KiCad using Python, you can use the pcbnew module. Here's a simple script:

```python
import pcbnew

# Load the current board
board = pcbnew.GetBoard()

# Create a new via
via = pcbnew.VIA(board)
board.Add(via)

# Set the via position and size
via.SetPosition(pcbnew.wxPointMM(10, 10)) # Position in mm
via.SetWidth(600000) # Via diameter in nanometers
via.SetDrill(300000) # Drill size in nanometers
via.SetViaType(pcbnew.VIA_THROUGH)

# Save the board
board.Save('path/to/save/your/pcb.kicad_pcb')
```

This script creates a through-hole via at a specified position on the current PCB.