I heart Laravel

Recently all the code I've been writing has been in Python which is definitely my preference at the moment. But I got some freelance work which required me to build a site using PHP so I went shopping for a framework and ended up with Laravel. I really couldn't have…

Error Logging

Putting an app live can be nerve racking. Who knows what will go wrong once it's released into the wild. So if something breaks you want to know about it with as much detail as possible. In debug mode, Flask provides some really helpful debugging information with a full stack…

Google Login

In the next few days we'll be rolling out Google OAuth authentication so users can login with their Google accounts rather than having to remember yet another password (although everyone should just be using 1Password). I started off using Flask OAuth but it doesn't properly support Python3 and seems to…

Dealing with xls files in Python

It's been a long day coding. I've nearly finished all the preliminary scrapers for each state parliament and I must say I'll be glad to move onto the next phase. I thought it's probably worth outlining my biggest coding struggle today just in case anyone else ever has the same…

Upgrading from Python 2 to Python 3

I've always liked to think of myself as an early adopter. However to date, I've been using Python 2 and it's been bugging me. We're up to Python 3.5 already. I think the biggest barrier for me has always been that OS X's default is still 2.7 but…

Database Listeners

I'm starting to work on a system of checks to ensure the database is up to date. The way I see it, the checks will run on a fairly regular cron and generate 'issues' where Data doesn't line up. Users will also have a way of generating 'issues' so there's…

Dealing with dodgy markup

Lately I've been working on scraping various parliamentary websites to collect all the data I need for the YVIH API. I might write up how I've gone about this process in more detail in another post as there's plenty to discuss. However today's post is about dealing with dodgy markup.…

Building queries with Flask-SQLAlchemy

I guess it's probably about time I wrote about a bit of code on this little blog of mine. [SQLAlchemy](http://www.sqlalchemy.org/" title="SQLAlchemy) is a 'Python SQL Toolkit and Object Relational Mapper'. As we know Flask is pretty barebones but there's plenty of extensions including…

Flask vs Django

Deciding how you are going to put your website together is clearly an important decision. You generally need to make that decision up front and it will go on to haunt you for some time. As I've already mentioned I've decided to go with Python rather than PHP, but I've…