Home » Flask

Tag Archives: Flask

Part 3: Flask API Decorators and Helpers

This is the third of three posts about building a JSON API with Flask. Make sure you start with part 1 and part 2. In the first post, we used a custom base SQLAlchemy class to serialize and deserialize database models to and from JSON. The second post created a RESTful API listing and updating users. Now we’re ready for ...

Read More »

Part 2: Building a Flask RESTful API

This is the second of three posts about building a JSON API with Flask. Part 1 arrived yesterday and part 3 is arriving tomorrow. In the previous post we learned how to serialize SQLAlchemy models to/from JSON. Now let’s use that to build a RESTful JSON API with Flask. What is a RESTful API A RESTfu API is a website ...

Read More »

Part 1: SQLAlchemy Models to JSON

This is the first of three posts about building a JSON API with Flask. Part 2 and part 3 arrive tomorrow and the day after. I’ve seen a lot of questions on StackOverflow about how to turn SQLAlchemy models into JSON. When building a JSON API with Flask and SQLAlchemy, you end up writing a lot of boilerplate api code ...

Read More »

Python: Flask – Generating a static HTML page

Whenever I need to quickly spin up a web application Python’s Flask library is my go to tool but I recently found myself wanting to generate a static HTML to upload to S3 and wondered if I could use it for that as well. It’s actually not too tricky. If we’re in the scope of the app context then we ...

Read More »