Add .baseurl getter to Python and C APIs.