It works differently for the different implementations, but changing the basePath is definitely possible with python too (because everyone has to query and test its local installations). You can either tweak the swagger config or try this: