From 073e24470c2e946dde083bd03a462df29030a8b3 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Wed, 21 Dec 2016 11:36:50 -0500 Subject: [PATCH] Show examples --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/README.md b/README.md index ab725ff..25fd11f 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,67 @@ PyPIHub ======= PyPI server for serving Python packages out of GitHub. + + +## Installing + +```bash +go get github.com/brettlangdon/pypihub +``` + +## Running + +```bash +pypihub -h +usage: pypihub --username USERNAME --access-token ACCESS-TOKEN [--bind BIND] [REPONAMES [REPONAMES ...]] + +positional arguments: + reponames list of '/' repos to proxy for (env: PYPIHUB_REPOS) + +options: + --username USERNAME, -u USERNAME + Username of GitHub user to login as (env: PYPIHUB_USERNAME) + --access-token ACCESS-TOKEN, -a ACCESS-TOKEN + GitHub personal access token to use for authenticating (env: PYPIHUB_ACCESS_TOKEN) + --bind BIND, -b BIND [
]: to bind the server to (default: ':8287') (env: PYPIHUB_BIND) [default: :8287] + --help, -h display this help and exit +``` + +### Example + +```bash +pypihub -u "" -a "" "brettlangdon/flask-env" "brettlangdon/flask-defer" [... /] +``` + +```bash +export PYPIHUB_USERNAME="" +export PYPIHUB_ACCESS_TOKEN=""" +export PYPIHUB_REPOS="brettlangdon/flask-env brettlangdon/flask-defer [... /]" +pypihub +``` + +## Endpoints + +* `/` - Page containing all links for all projects/assets + * This endpoint can be used with `--find-links` to make all projects accessible + * e.g. `pip install --find-links http://localhost:8287/` +* `/` - Page containing all links for a given GitHub repo owner + * This endpoint can be used with `--find-links` to make all projects for a given GitHub owner accessible + * e.g. `pip install --find-links http://localhost:8287/brettlangdon` +* `//` - Page containing all links for a specific GitHub repo + * This endpoint can be used with `--find-links` to make all releases for a specific GitHub repo accessible + * e.g. `pip install --find-links http://localhost:8287/brettlangdon/flask-env` +* `/simple` - PyPI simple index page + * This page lists all of the project names available + * This endpoint can be used with `--index-url` or `--extra-index-url` + * e.g. `pip install --extra-index-url http://localhost:8287/simple` +* `/simple/` - PyPI simple index project links page + * This page contains the links for the given project name + * This endpoint can be used with `--find-links`, but is typically used by `pip` when using `--extra-index-url` + * See `/simple` example above for usage + +## Usage with pip + +```bash +pip install --extra-index-url http://localhost:8287/simple +```