GitHub API

As I fetched macro code using BeautifulSoup. Now the FreeCAD workbenches are hosted at one place i.e. https://github.com/FreeCAD/FreeCAD-addons/. I needed to fetch the file details from this repository from GitHub. It was already done in Python by parsing the HTML and scraping it. I tried a Python module called BeautifulSoup that makes it easy to play with the HTML within Python.

But these aren’t the permanent solutions. We’ll have to make frequent changes in our code if the source website (GitHub) changes. So I thought of using GitHub API. It’ll be more of a stable solution.

Here is the list of libraries you can use in any programming language: https://developer.github.com/libraries. I am going to explore PyGithub.

Install PyGithub:

pip install pygithub

For more, read: http://pygithub.github.io/PyGithub/v1/introduction.html

Stay tuned!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s