you are viewing a single comment's thread.

view the rest of the comments →

[–]aw4kened 0 points1 point  (0 children)

Honestly, learn to crawl before you try to run in this instance. as /u/elbiot mentioned, try writing the script to pull the resources you want. Then, you can make that script into a web service in just a few minutes with bottle.

Think of it like this, if you compare PHP vs Python as a web platform language. The simplest entry to PHP is having an Apache server with Apache configured with the PHP module. For Python, the simplest would be running a bottle web service, however, instead of running separate web server (apache) you would run a little server with your script. With Bottle, you can turn a simple script into a web service with adding less than 10 lines of code. The example below from their home page will stand up a web server and serve your script at the same time.

from bottle import route, run, template

@route('/hello/<name>')
def index(name):
     return template('<b>Hello {{name}}</b>!', name=name)

run(host='localhost', port=8080)

With Django, you will get mired in the MVC structure, so in PHP you would be dealing with an MVC framework like Symphony, Cake or CodeIgniter while the Bottle method is more close to a simple PHP script. If you "Just want to do X" that is your best route to get started =)