No internal API stability guarantees are made, but for reference here is a basic outline of the source implementation:
bindep
bindep.depends
bindep.__main__