Skip to main content

Making An Update Server For PythonAnywhere And GitHub

Cloud based IDEs and development tools have grown over the years, though most have limitations in their free tiers and may not be fully compatible with other services such as GitHub. [Aadi Bajpai] loved using PythonAnywhere and to collaborate using GitHub, so he made a update server that automatically updates the running code once you make a push to Github

PythonAnywhere gives you access to a python shell over a web browser, and also lets you run a web app that can be accessed via a custom sub-domain. Even though it does not have direct integration with GitHub, you can drop to the bash shell to and get access to a git client.

For this hack, [Aadi Bajpai] utilizes the webhooks from GitHub that are triggered when a push event is detected. A flask server running on PythonAnywhere is written such that once triggered by the get POST request, it locally executes a git pull from the repository. There a bit more work that allows adding a bit of security sauce to the recipe but it is a pretty elegant solution and can be used for other cases as well.

Setting up alert notifications has been demonstrated to be an interesting task, though integrating Discord or Slack for notifications adds a little more bragging rights.



from Hackaday https://ift.tt/2KEYfbo

Comments

Popular posts from this blog

Bill Gates steps down from Microsoft’s board to focus on philanthropy

In an announcement on Friday, Microsoft revealed that company co-founder Bill Gates has decided to step down from his role on its Board of Directors in order to focus on his philanthropic efforts at the Bill & Melinda Gates Foundation. This is Gate’s biggest change to his role at Microsoft since stepping down as company chairman in February 2014. According … Continue reading from SlashGear https://ift.tt/2We90Gu

Uber claims top spot in Indian ride-hailing market

Uber facilitated 14 million rides a week in India last year, the American ride-hailing firm said as it claimed the tentpole position in the key overseas market. In a report  (PDF) published on the sidelines of its quarterly earnings Thursday afternoon , Uber said that it commanded over 50% of the ride-hailing market in India — among some other regions — and was the category leader. The publicly listed company cited its internal estimations for the claim, it said. In comparison, Uber handled 11 million rides a week in India in 2018, a spokesperson told TechCrunch. The revelation is especially interesting, since both Uber and its chief local rival Ola have tended to avoid talks about the number of rides they serve in India. In a 2018 blog post , Ola revealed that its platform “moves over two million people every day.” A spokesperson for the Indian startup, which like Uber counts SoftBank as an investor, declined to reveal the new figures, but issued a statement in which it ...

World Economic Forum launches Global AI Council to address governance gaps

The World Economic Forum is creating a series of councils that create policy recommendations for use of things like AI, blockchain, and precision medicine. Read More from VentureBeat http://bit.ly/2EKBjD4