\begin{Verbatim}[commandchars=\\\{\}]
\PYG{k+kn}{from} \PYG{n+nn}{Bio} \PYG{k+kn}{import} \PYG{n}{ExPASy}
\PYG{k+kn}{from} \PYG{n+nn}{Bio} \PYG{k+kn}{import} \PYG{n}{SeqIO}

\PYG{k}{with} \PYG{n}{ExPASy}\PYG{o}{.}\PYG{n}{get\PYGZus{}sprot\PYGZus{}raw}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}O23729\PYGZdq{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{handle}\PYG{p}{:}
    \PYG{n}{seq\PYGZus{}record} \PYG{o}{=} \PYG{n}{SeqIO}\PYG{o}{.}\PYG{n}{read}\PYG{p}{(}\PYG{n}{handle}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}swiss\PYGZdq{}}\PYG{p}{)}
\PYG{k}{print}\PYG{p}{(}\PYG{n}{seq\PYGZus{}record}\PYG{o}{.}\PYG{n}{id}\PYG{p}{)}
\PYG{k}{print}\PYG{p}{(}\PYG{n}{seq\PYGZus{}record}\PYG{o}{.}\PYG{n}{name}\PYG{p}{)}
\PYG{k}{print}\PYG{p}{(}\PYG{n}{seq\PYGZus{}record}\PYG{o}{.}\PYG{n}{description}\PYG{p}{)}
\PYG{k}{print}\PYG{p}{(}\PYG{n+nb}{repr}\PYG{p}{(}\PYG{n}{seq\PYGZus{}record}\PYG{o}{.}\PYG{n}{seq}\PYG{p}{))}
\PYG{k}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}Length }\PYG{l+s+si}{\PYGZpc{}i}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{\PYGZpc{}} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{seq\PYGZus{}record}\PYG{p}{))}
\PYG{k}{print}\PYG{p}{(}\PYG{n}{seq\PYGZus{}record}\PYG{o}{.}\PYG{n}{annotations}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}keywords\PYGZdq{}}\PYG{p}{])}
\end{Verbatim}
