Explore Developer Center's New Chatbot! MongoDB AI Chatbot can be accessed at the top of your navigation to answer all your MongoDB questions.

Learn why MongoDB was selected as a leader in the 2024 Gartner® Magic Quadrant™
MongoDB Developer
MongoDB Developer Center
chevron-right
Developer Topics
chevron-right

Python

plus Follow
Sign in to follow topics
A high-level, interpreted programming language and it is used for general purpose. Python is one of the most popular languages for data-intensive tasks and data science because of its rich library support for statistics, machine learning, and AI-related tasks.

Featured

Tutorial

Building Generative AI Applications Using MongoDB: Harnessing the Power of Atlas Vector Search and Open Source Models

Learn how to build generative AI (GenAI) applications by harnessing the power of MongoDB Atlas and Vector Search....
MongoDB thumbnail image
AIVector SearchPythonAtlas

Sep 18, 2024 | 10 min read
Prakul Agarwal
Article

Building a Flask and MongoDB App with Azure Container Apps

MongoDB thumbnail image

Apr 02, 2024 | 8 min read
Video

Build an AWS Lambda Serverless function with PyMongo & MongoDB

MongoDB thumbnail image
Play Button

Sep 25, 2023 | 20 min
Python Articles
All Python Articles
Article

Depth-first Hybrid Search for GraphRAG

MongoDB thumbnail image

Feb 02, 2025 | 14 min read
Article

Harnessing Natural Language for MongoDB Queries With Google Gemini

MongoDB thumbnail image

Dec 13, 2024 | 8 min read
Article

Building a Foreign Correspondent With MongoDB, Anthropic's Claude, Python

MongoDB thumbnail image

Dec 09, 2024 | 14 min read
All Python Articles
Python Quickstarts
All Python Quickstarts
Quickstart

Building RAG Pipelines With Haystack and MongoDB Atlas

MongoDB thumbnail image

Sep 18, 2024 | 4 min read
Quickstart

Best Practices for Using Flask and MongoDB

MongoDB thumbnail image

Sep 16, 2024 | 5 min read
Quickstart

Building AI and RAG Apps With MongoDB, Anyscale and PyMongo

MongoDB thumbnail image

Jul 17, 2024 | 7 min read
Python Code Examples
All Python Code Examples
Code Example

A Spotify Song and Playlist Recommendation Engine

MongoDB thumbnail image

Nov 13, 2023 | 6 min read
Code Example

Example Application for Dog Care Providers (DCP)

MongoDB thumbnail image

Jul 12, 2024 | 3 min read
Code Example

GroupUs

MongoDB thumbnail image

Jul 07, 2022 | 1 min read
Python Tutorials
All Python Tutorials
Tutorial

How to Improve LLM Applications With Parent Document Retrieval Using MongoDB and LangChain

MongoDB thumbnail image

Feb 11, 2025 | 15 min read
Tutorial

Optimizing for Relevance Using MongoDB Atlas and LlamaIndex

MongoDB thumbnail image

Feb 11, 2025 | 13 min read
Tutorial

Local-first and Reasoning-enhanced RAG With DeepSeek and MongoDB

MongoDB thumbnail image

Feb 06, 2025 | 8 min read
Python Videos
All Python Videos
Video

Meet the Makers Behind Django MongoDB Backend

MongoDB thumbnail image
Play Button

Feb 10, 2025
Video

Improve Your LLM Applications Using Parent Document Retrieval

MongoDB thumbnail image
Play Button

Jan 16, 2025 | 37 min
Video

Building a Test Framework with MongoDB

MongoDB thumbnail image
Play Button

Jan 14, 2025 | 25 min
All Python Content
search
  • Latestcheck
  • Highest Rated
Tutorial

How to Improve LLM Applications With Parent Document Retrieval Using MongoDB and LangChain

In this tutorial, you will learn about a technique called parent document retrieval and implement it in RAG and Agentic workflows using MongoDB’s LangChain integration.
MongoDB thumbnail image

Feb 11, 2025
Apoorva Joshi
Tutorial

Optimizing for Relevance Using MongoDB Atlas and LlamaIndex

In this tutorial, we will learn how to perform full-text, vector, and hybrid searches using MongoDB’s LlamaIndex integration and explore ways to tune them to optimize for relevance.
MongoDB thumbnail image

Feb 11, 2025
Apoorva Joshi
Video

Meet the Makers Behind Django MongoDB Backend

Join this livestream to hear directly from the lead engineer Jib Adegunloye, and lead product manager Shubham Ranjan, as they dive into their newly released Django MongoDB Backend library, now in public preview! Get insights straight from the creators, learn how it works, and ask your questions live. - Quickstart on dev.to → https://mdb.link/aKuvHXrvYKU-devto Docs → https://mdb.link/aKuvHXrvYKU-docs GitHub repo → https://mdb.link/aKuvHXrvYKU-repo Developer Forum → https://mdb.link/aKuvHXrvYKU-forum
MongoDB thumbnail image
Play Button

Feb 10, 2025
Tutorial

Local-first and Reasoning-enhanced RAG With DeepSeek and MongoDB

Discover how DeepSeek’s innovative open-source models—DeepSeek-V3, DeepSeek Coder, and the groundbreaking reasoning model DeepSeek-R1—are revolutionizing local-first, retrieval-augmented generation (RAG) applications with MongoDB. This comprehensive guide details how cutting-edge chain-of-thought reasoning and model distillation techniques enhance AI performance and explainability. Learn how integrating tools like Ollama, Nomic-Text-Embed, LangChain, and Streamlit with MongoDB Atlas enables secure, scalable, and privacy-focused deployments ideal for industries such as healthcare and defense. Unlock advanced technical insights and step-by-step implementation strategies to build dynamic on-device AI applications that process and analyze sensitive documents with unparalleled accuracy and flexibility.
MongoDB thumbnail image

Feb 06, 2025
Thibaut Gourdel
Article

Depth-first Hybrid Search for GraphRAG

This article compares five retrieval strategies namely pre-filtering, vector search, full-text search, hybrid search, and graph-based retrieval for RAG.
MongoDB thumbnail image

Feb 02, 2025
Shounak Acharya (+1)
Tutorial

DeepSeek and the Future of LLMs: Why MongoDB’s LLM-agnostic Approach Matters

Discover how DeepSeek-R1—a revolutionary open-source LLM trained with innovative reinforcement learning—challenges commercial giants like GPT-4, while MongoDB’s LLM-agnostic architecture powers a cost-efficient, real-time retrieval-augmented generation system. Learn about advanced reasoning, benchmark performance, and practical implementation steps that make this cutting-edge AI solution a game-changer in the evolving AI landscape.
MongoDB thumbnail image

Feb 01, 2025
Han Heloir (+1)
Tutorial

Boosting AI: Build Your Chatbot Over Your Data With MongoDB Atlas Vector Search and LangChain Templates Using the RAG Pattern

Learn how to enhance your AI chatbot's accuracy with MongoDB Atlas Vector Search and LangChain Templates using the RAG pattern in our guide.
MongoDB thumbnail image

Jan 29, 2025
Arek Borucki
Tutorial

MongoDB Atlas Authentication Using Service Accounts (OAuth)

MongoDB thumbnail image

Jan 23, 2025
Wojciech Trocki
Video

Improve Your LLM Applications Using Parent Document Retrieval

✅ Try MongoDB 8.0 → https://mdb.link/v=-fcuS0rk1KY ✅ Sign-up for a free cluster → https://mdb.link/v=-fcuS0rk1KY-free ✅ Written version → https://mdb.link/v=-fcuS0rk1KY-written - In this livestream, you will learn about an advanced retrieval technique called parent document retrieval. We will look at use cases where this technique is useful and how it works, followed by a live code walkthrough of how to implement it in RAG and agentic applications.
MongoDB thumbnail image
Play Button

Jan 16, 2025
Video

Building a Test Framework with MongoDB

Try MongoDB 8.0 → https://mdb.link/Bz7qAxMXKo4 Sign-up for a free cluster → https://mdb.link/Bz7qAxMXKo4-8.0 Subscribe to MongoDB YouTube→ https://mdb.link/subscribe 🎥 Dive into the world of MongoDB testing with Pytest! In this tutorial, Developer Advocate Mark Smith shows you how to leverage Pytest fixtures for running tests on your MongoDB cluster with ease and efficiency. 🔍 What You’ll Learn: How to create and use Pytest fixtures to manage MongoDB client sessions How to write integration tests using transactions in MongoDB to ensure that your database states are clean post-testing The importance of a data access layer (DAL) when interfacing with your MongoDB database Efficiently testing CRUD operations with a fun Pirates theme! 🛠 Key Features: Setting up your MongoDB client and handling session scope Using transactions to allow changes to your database that automatically rollback after tests Understanding the power of fixtures over simple utility functions Whether you're developing apps or looking to write robust tests for your MongoDB data interactions, this video is packed with essential techniques to enhance your workflow and ensure optimal data integrity. Visit Mongodb.com → https://www.mongodb.com Read the MongoDB Blog → https://www.mongodb.com/blog Check out the MongoDB Developer Center → https://www.mongodb.com/developer
MongoDB thumbnail image
Play Button

Jan 14, 2025