John Lindquist

John is the creator of http://egghead.io: a leading video channel with >10,000 subscribers and >1,500,000 video views. John is also a Technology Evangelist at JetBrains (http://jetbrains.com).
John has spent the majority of his career developing Rich Web Applications. Before joining JetBrains, he was a Technical Architect at Roundarch (http://roundarch.com) leading large teams in building the latest and greatest in web apps for the Air Force, HBO, and Bloomberg.

Building RESTful APIs with Flask in PyCharm

Quickly make your API accessible in just a few lines of code.

Building APIs can be easier than you think. Say you’ve developed a product or service and would like to provide developer access via a RESTful API quickly, with minimal effort and overhead. The lightweight Flask Python Web framework lets you easily build extendible APIs fast, without the bloat and ceremony of similar tools. Add to this the comprehensive workflow of a modern integrated development environment like PyCharm and you’ll be up and running posthaste.

We’ll start with installing a few prerequisites and set up our working environment so that testing, debugging, and extending the API can happen without too much hopping around. Afterward, we’ll move on to connecting to our database with SQLAlchemy, a Python SQL toolkit and object-relational mapper. We’ll finish up by creating the RESTful API with Flask-Restless, a Flask extension that provides the simple generation of RESTful JSON APIs for database models defined by SQLAlchemy.

Read more…