Posts tagged with "flask"

Flask is a Python micro web framework. It is a "micro" framework in the sense that it aims to only provide the core capabilities related to handling web requests and is deliberately un-opinionated with regards to other choices. The goal of the project is to be minimalist in terms of what it includes, so it does not depend on any other libraries such as a database management — that are often useful, but not always required in a web development setting. This philosophy is in contrast to Django, another popular Python web framework, that has a "batteries included" approach and ships with a powerful Object Relational Mapper (ORM) and other various helpful libraries, while being more opinionated in its approach.

Flask in combination with some other libraries provides you with a powerful base for building web products:

Furthermore there are web frameworks such as Quart that supply a similar interface to Flask but with a fully asyncio (ASGI) implementation.

We have made extensive use of Flask in various projects to create APIs using OpenAPI.

2 Posts

Pytest fixtures with Flask

Recently I've been working on a web API with Flask, here's how I went about making unit tests with pytest work well with Flask and testing the API via requests.

Published on May 27th, 2018 by Janis Lesinskis.

Enforcing foreign key constraints with SQLite

There was a perplexing issue we ran into when testing the Persephone web API. There was a foreign key constraint specified in SQLAlchemy but you could add in new entries with bogus foreign keys without the DB engine raising an . Why did this happen?

Published on May 7th, 2018 by Janis Lesinskis.