% en utilisant Pythontex
\documentclass{article}
\usepackage{tikz}
\usepackage{pythontex}
\usepackage[paperwidth=10cm,paperheight=10cm,margin=0cm]{geometry}
\setlength{\parindent}{0pt}
\newcommand{\labase}{%
\clip (-5,-5) rectangle (5,5);
\draw[->] (-5,0) -- (5,0);
\draw[->] (0,-5) -- (0,5);
\draw plot[domain=-5:-0.1,samples=100] (\x,{1/\x});
\draw plot[domain=0.1:5,samples=100] (\x,{1/\x});
\node[below left] at (0,0) {$O$};
}
\begin{document}
\begin{pycode}
x = -5
while x < 5:
    y = 1/x
    r = (x**2+y**2)**0.5
    if r<10 and abs(y)<10:
        print('\\begin{tikzpicture}[>=latex]\\labase')
        k = -5
        while k <= x:
            p = 1/k
            rr = (k**2+p**2)**0.5
            if rr<10 and abs(p)<10:
                print('\\draw[red] ('+str(k)+','+str(p)+') circle ('+str(rr)+' cm);\n')
            k += 0.1
        print('\\end{tikzpicture}\n')
    x += 0.1
\end{pycode}
\end{document}