Google Talk uses plain XMPP with the only twist is that it requires non-standardized authentication schemes to log into their servers as a client (back then it was — server-to-server communication with gtalk servers works without any tweaks.X-GOOGLE-TOKEN
SASL mechanism, and now it's supposedly OAuth2)
Note that you might as well consider setting up your own XMPP server as there are many free XMPP servers (ejabberd, prosody, openfire, jabberd2), and there are free XMPP-enabled web chat clients (with JWChat being one example) in case you'll want to enable people to chat directly from the web UI.
As to libraries, I heard it's fashionable to use the Twisted framework when writing network-enabled applications for Python, so look at what's available. go-xmpp
mentioned by @jnml does not appear to support even the bare minumum requirements specified in the core XMPP RFC yet.