Texture with a grid of points? With Python?
A wave texture will give you a gradient from black to white. Two of them rotated ninety degrees from each other gives you a grid. A colour ramp can then adjust the size of each square, which with the gradient becomes circular at smaller sizes.

Set the colour ramp to use constant interpolation to get a sharper edge. Adjust the position of the ramp stops to adjust the size of the spots. The mapping nodes and scale of the wave texture will adjust the overall placement.