# pymongo

Published articles for pymongo.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Build a Basic CRUD Application With Flask-PyMongo

DevFeed: [Build a Basic CRUD Application With Flask-PyMongo](<https://devfeed.tech/articles/build-a-basic-crud-application-with-flask-pymongo-21829.md>)

Original publisher: [Read original article](<https://www.thepolyglotdeveloper.com/blog/2025/04/build-a-basic-crud-application-with-flask-pymongo/>)

Author: Anaiya Raisinghani

Published: 2025-04-26T00:37:28Z

Content type: tutorial

Language: en

Sources: [Nic Raboy](<https://devfeed.tech/sources/nic-raboy.md>)

Topics: [Flask](<https://devfeed.tech/topics/flask.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [CRUD](<https://devfeed.tech/topics/crud.md>), [Database](<https://devfeed.tech/topics/database.md>), [Library](<https://devfeed.tech/topics/library.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [code](<https://devfeed.tech/tags/code.md>), [database](<https://devfeed.tech/tags/database.md>), [flask](<https://devfeed.tech/tags/flask.md>), [framework](<https://devfeed.tech/tags/framework.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [pymongo](<https://devfeed.tech/tags/pymongo.md>), [python](<https://devfeed.tech/tags/python.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [vscode](<https://devfeed.tech/tags/vscode.md>)

### AI overview

This tutorial explains how to build a basic CRUD application with Flask-PyMongo and MongoDB. It introduces Flask, describes Flask-PyMongo's integration and configuration features, and outlines prerequisites including MongoDB Atlas, VSCode, and Python 3.10+.

### Source excerpt

In this tutorial, we will dive head first into utilizing MongoDB's Flask-PyMongo library! We will build a basic CRUD (create, read, update, delete) Flask-PyMongo application and learn about how intuit... The post Build a Basic CRUD Application With Flask-PyMongo appeared first on DEV.

## Auto incrementing IDs for MongoDB

DevFeed: [Auto incrementing IDs for MongoDB](<https://devfeed.tech/articles/auto-incrementing-ids-for-mongodb-26283.md>)

Original publisher: [Read original article](<https://masnun.com/auto-incrementing-ids-for-mongodb/>)

Author: masnun

Published: 2018-12-06T17:14:35Z

Content type: tutorial

Language: en

Sources: [Abu Ashraf Masnun](<https://devfeed.tech/sources/abu-ashraf-masnun.md>)

Topics: [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [pymongo](<https://devfeed.tech/topics/pymongo.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [general](<https://devfeed.tech/tags/general.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [nosql](<https://devfeed.tech/tags/nosql.md>), [operator](<https://devfeed.tech/tags/operator.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [pymongo](<https://devfeed.tech/tags/pymongo.md>), [python](<https://devfeed.tech/tags/python.md>), [relational-databases](<https://devfeed.tech/tags/relational-databases.md>)

### AI overview

This tutorial explains how to implement sequential, auto-incrementing IDs in MongoDB using a separate collection that stores the last used numeric ID. It describes atomically incrementing the value before inserting a document and notes that the older find-and-modify approach is deprecated.

### Source excerpt

If you're familiar with relational databases like MySQL or PostgreSQL, you're probably also familiar with auto incrementing IDs. You select a primary key for a table and make it auto incrementing. Every row you insert afterwards, each of them gets a new ID, automatically incremented from the last one. We don't have to keep track [...] The post Auto incrementing IDs for MongoDB appeared first on Abu Ashraf Masnun.

## Schemaless Postgres in Django

DevFeed: [Schemaless Postgres in Django](<https://devfeed.tech/articles/schemaless-postgres-in-django-41114.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2012/06/11/schemaless-django/>)

Author: Map

Published: 2012-06-11T20:55:56Z

Content type: tutorial

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [Django](<https://devfeed.tech/topics/django.md>), [Database](<https://devfeed.tech/topics/database.md>), [data](<https://devfeed.tech/topics/data.md>), [MongoDB](<https://devfeed.tech/topics/mongodb.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [development](<https://devfeed.tech/tags/development.md>), [django](<https://devfeed.tech/tags/django.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [orm](<https://devfeed.tech/tags/orm.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [pymongo](<https://devfeed.tech/tags/pymongo.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

This article explains how to use PostgreSQL's hStore key-value column type for flexible, schemaless data in Django. It presents hStore as an alternative to using MongoDB for product-catalog data while retaining relational models, indexes, and filtering.

### Source excerpt

Earlier this week while I was at DjangoCon EU there seemed to be a surprising amount of talk about MongoDB. My problem with this isn't with MongoDB, but in the assumption that only Mongo can solve what you're looking for. By and far the most common feature is people want schemaless. It gives them flexibility in their data model and lets them iterate quickly. While I still opt for relational models that map cleanly to a relational database, there are cases where developers may want schemaless. I gave a quick lightning talk on this with slides here, but it is worth recapping. The example given by pydanny was a product catalog. You may have different items you want to store for a catalog. Lets take an example below: django_pony = {'name': 'Django Pony', 'rating': '5'} pink_pony = {'name': 'Pink Pony', 'rating': '4', 'color': 'pink'} In the case of a product catalog it could be understandable you don't want to normalize every possible spec for the product. The argument for Mongo is so commonly that you can easily work with this data model. Admittedly it is quite simple: from pymongo import Connection connection = Connection() django_pony = {'name': 'Django Pony', 'rating': '5'} connection.product.insert(django_pony) The problem is that this assumes other schemaless options don't exist or are inferior. Enter hStore hStore is a column type within Postgres. It is a key value store that allows you to store a dictionary, with text values. It alone is not a full document store replacement, but allows for flexibility in your data model where you need it while letting you use relational models elsewhere. Its not exactly new within Postgres either, as its been available since 8.4, however its recently become easier to work with and is supported in some form or another by more frameworks. To do the same as above we only need to do a few steps: Within your Postgres 9.1 or higher database: create extension hstore; If you don't have Postgres already if you're on a Mac quickly grab a