Skip to content

Instantly share code, notes, and snippets.

@schmir
Created February 17, 2013 22:08
Show Gist options
  • Save schmir/4973756 to your computer and use it in GitHub Desktop.
Save schmir/4973756 to your computer and use it in GitHub Desktop.
# demo file showing how to serve multiple collections under different
# paths and replacing the root view
# run 'gunicorn -w4 multi_pypi_custom_root:app_public'
import pypiserver
app_public = pypiserver.app("/home/ralf/packages/private")
app_private = pypiserver.app("/home/ralf/packages/public")
app_public.mount("/private", app_private)
@app_public.route("/")
def public_root():
return "hello world"
@app_private.route("/")
def private_root():
return "secret root"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment