All posts tagged ‘python’

File Under: Programming

Video: Parsing Horrible Things with Python

The “horrible thing” in developer Erik Rose’s talk from this year’s PyCon is the Mediawiki syntax, but that’s just a jumping off point for one of the best overviews of data parsing that I’ve run across. If you’ve got a project that involves parsing, or are, like me, considering one, this talk is a must-watch.

This is PyCon, so much of the talk focuses on parsing in Python, but there’s plenty of broader, dare I say, “parsing philosophy” that make it well worth a watch even if you don’t end up using the specific Python parsing libraries Rose mentions.

File Under: Web Services

Amazon’s ‘Elastic Beanstalk,’ Now With Python Power

Elastic Beanstalk, making easier to get your Python apps to the cloud. Image: Karin Dalziel/Flickr.

Python developers, there’s a new way to get your apps running in the cloud — Amazon’s Elastic Beanstalk service now supports Python. Elastic Beanstalk previously supported PHP, Java and .NET apps.

The new Python support means that popular web frameworks like Django (which powers Instagram, Everyblock and other popular sites) are easier to deploy across Amazon’s suite of cloud services.

It also means that Amazon and Google App Engine are once again going head to head, this time over Google App Engine’s territory. Thanks to its Python-friendly environment, App Engine has been a favorite with Python developers looking to deploy apps on hosted services.

While it’s always been possible to host Python apps on Amazon, setting up and configuring apps can be a pain. That’s where Beanstalk comes in. For those who haven’t tried it, Elastic Beanstalk greatly simplifies the process of deploying your app to Amazon’s various cloud services, including setting up new EC2 instances, load balancing with Elastic Load Balancing, as well as scaling and managing your app after it’s deployed. Beanstalk also integrates with Git and virtualenv.

Originally Beanstalk had a distinctly Java bias to it, but since then it has expanded to handle Java, .NET and now Python as well. For more details on exactly how Beanstalk’s new Python support works, check out the Beanstalk overview page. Django developers should also read through Amazon’s guide to deploying a Django application to AWS Elastic Beanstalk.

File Under: Frameworks, Programming

Use Templates in Django

This is part 4 of Webmonkey’s introductory Django tutorial. If you’re arriving here to learn about getting started with Django, start back at the beginning with Lesson 1.

When we left off last time, we had defined some URLs for our blog and constructed a custom view to handle displaying posts by tag. If you point your browser to our development URL at this point, (http://127.0.0.1:8000/blog/) you’ll still see a Django error page complaining that the template blog/list.html does not exist. Don’t panic, it’s true — we haven’t created it yet.

It’s time to tackle the last aspect of Django, the template syntax.


Continue Reading “Use Templates in Django” »
File Under: Frameworks, Programming

Integrate Web APIs into Your Django Site

Welcome back! If you’ve been following along our entire series of tutorials on building sites with Django, you’ll (by now) have built a blog website with date-based archives and some nice extras such as tagging and Markdown support.

Along the way, we also ported our app over to the new Newforms Admin version of Django so that we’ll be all ready to go when Django hits version 1.0. If you haven’t done that yet, be sure to do it before we continue.

Continue Reading “Integrate Web APIs into Your Django Site” »
File Under: Frameworks, Programming

Build a Microblog with Django

Thus far in our introductory Django tutorial, we’ve installed the open-source Django framework, set up a blog and beefed it up by adding some extras like semantic content tags, some handy template tags and a list of our bookmarks from delicious.com. If you haven’t been following along, now would be a good time to go back to Lesson 1 and catch up.

However, what we’ve created is not much different than what one could do with WordPress or another out-of-the-box blogging tool. That’s OK for a learning project. But now we’re getting close to being experts, we are going to explore some territory beyond what we can do with pre-built tools.

Let’s build something a little more advanced. Let’s build a microblog.

Continue Reading “Build a Microblog with Django” »