Docs-first tip - test prerelease Github packages

I’m all about a docs-first approach – for example, in the latest SDK domain-model overhaul I participated in, I was able to contribute to the API’s call signature consistency by commenting early on the technical design docs.

I’m also about testing my code samples as early as possible! And today I found a way to do it in Python; hope it helps other! I’m sure this trick is quite familiar to QA teams, but it was my first time figuring it out (guess I’ve never been so ahead of a release curve as now).


I wanted to test a prerelease branch of an SDK hosted as a python package on Github.

Normally I install this package through pip, like pip some-sdk. How to install it straight from GitHub?


It’s pretty simple! Use pipenv. For example, say I wanted to install the new-feature-branch branch of In an empty project dir, I can run:

pipenv install -e git+

Where I get the egg from the value of name in the package’s Then I just run my sample code using pipenv:

pipenv run python

I’m sure there are similarly easy approaches for other nice package managers, like npm for javascript, etc.


I used:




If you’re not getting the results you expect, do some sanity checking:

  • are you pulling the branch as you expect? do you see the methods/attributes that you expect from your branch? you can examine your module in your code, for example: import somesdk then print(dir(somesdk)) #see methods and attributes
  • try pipenv clean to uninstall anything not specified in Pipfile.lock
  • examine your Pipefile.lock. Does the req for your package listed there match the latest commit hash for the branch you want?