How can I get a release version of a public repo with Python?

Hi guys,
I am wondering how can I get a release version of a public repo with Python?

Your answer and guide will be appreciated!

1 Like

Are you asking how to use python to interact with GitHub’s release APIs?

1 Like

The way python package distribution works is that releases are primarily published through the Python Packaging Index (PyPi). Github repositories are only used to host the source code of the package and usually mentioned on the PyPi page for the package. Such packages are installed by running the command pip install <package_name>.

Of late though, even Github has started acting as the package registry for some kind of packages, most notably NPM, Ruby Gems, NuGet, Apache Maven and Docker. Python package publishing hasn’t been enabled yet as far as I know. Having said that, if the package is relatively small, many developers publish it on the release page of the Github repo itself. At the very least, the Github repo will contain information on how to install the release version of the package which, in most of the cases, is just pip install <package_name>.

1 Like

Yes. That is what I am seeking for.

@songyuc thanks for posting your question - it looks like our Ecosystem category might be a better fit for what you’re looking for so I’ve moved it over there. Best of luck!