See /usr/bin/svnshell for an example that uses the python bindings.