MongoDB in Flask
MongoDB is far and away the most popular NoSQL database. MongoDB is also the best-supported NoSQL database for Flask and Python in general. Therefore, our examples will focus on MongoDB.
MongoDB is a document store NoSQL database. Documents are stored in collections, which allow grouping of similar documents, but no similarities between documents are necessary to store a document in a collection. Documents are defined in a JSON superset named BSON, which stands for Binary JSON. BSON allows JSON to be stored in binary format rather than in string format, saving a lot of space. BSON also distinguishes between several different ways of storing numbers, such as 32-bit integers and doubles.
To understand the basics of MongoDB, we will ...
Get Mastering Flask now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.