MongoDB with Async Python Course

MongoDB with Async Python Course

English | MP4 | AVC 2560×1440 | AAC 44KHz 2ch | 111 Lessons (7h 20m) | 2.33 GB

This course will teach you how to use MongoDB and document databases to build simpler and faster data-driven applications.

We start by explaining the origin and major concepts of NoSQL and document databases. You then learn how to work with MongoDB from its native shell as well as many of the CLI and GUI management tools.

Many MongoDB courses stop there. This course is meant to be a practical end-to-end coverage of MongoDB. We go beyond scratching the surface by covering real-world topics.

You’ll see how to use Beanie (a popular ODM for MongoDB – think ORM for NoSQL) to map classes to MongoDB. Beanie is based on state-of-the-art Python technologies such as Pydantic and Python’s async and await.

In this code-based and hands-on, demo-driven course, we will build some simple example apps using Beanie. Then we’ll move on to modeling real PyPI data with 100,000s of records in MongoDB. Once we have our Python code working with the PyPI data, we’ll build out a full FastAPI API around the data showing the smooth integration of Beanie and async MongoDB within FastAPI.

After we master working with MongoDB from Python, we’ll turn our attention to performance. We take a large database with millions of data points and make it run hundreds of times faster than you get out-of-the-box with MongoDB. We test our performance changes with both custom Python code and the Locust load testing framework.

We wrap up the course by deploying MongoDB to production Linux servers. There are a few very important steps to getting MongoDB running in production and we’ll go step-by-step through this setup.

In the end, you’ll be ready to start building and running high-performance, MongoDB-backed, data-driven applications.

In this course, you will:

  • How document databases, such as MongoDB, work
  • Where MongoDB fits in the larger scope of databases used in the world
  • How to install and configure MongoDB and several management tools and GUIs
  • A basic set of MongoDB’s native shell commands and queries
  • Foundational technologies such as Pydantic and Python’s async and await
  • How to design data models with Beanie and Pydantic
  • Understand the tradeoffs when modeling data with documents
  • Learn when it’s a good idea (and when it’s a bad one) to embed data within other records
  • Use ORM-style programming with MongoDB and Beanie
  • Use more efficient “in-place” operations such as addToSet with Beanie
  • Design projection classes in Pydantic for improved performance
  • How to safely store user accounts (namely passwords) in MongoDB
  • To deeply integrate Beanie and MongoDB with FastAPI
  • Create complex indexes in MongoDB from Beanie for 1000x performance boosts
  • Use indexes to enforce data integrity in MongoDB
  • Safely deploy MongoDB in a self-hosted environment within a cloud provider on multiple Linux machines
  • Use the load testing framework Locust to probe and test the performance limits of your MongoDB-based web APIs
  • And lots more
Table of Contents

1 Introducing the Course
2 MongoDB is Loved
3 MongoDB is fast
4 Python’s asyncio
5 What is Beanie and What is an ODM
6 Course Topics
7 Meet Your Instructor Michael Kennedy
8 Setup Introduction
9 Installing MongoDB
10 Studio 3T GUI
11 Importing PyPI Data
12 Verifying the Data with Studio 3T
13 Document Dbs introduction
14 How Document Databases Work
15 Who uses MongoDB
16 Mongo Shell
17 A More Complex Query
18 And Operators in Queries
19 Querying Embedded Data
20 Studio 3T- A Better Shell
21 Query Operators
22 Queries- Logical Operators
23 Queries- Projections
24 Pydantic Introduction
25 A Time of Change for Pydantic
26 Get the Plugins
27 Built on Pydantic
28 Project Setup
29 Our First Pydantic Model
30 JSON to Pydantic Converter
31 Get the Full Story on Pydantic
32 Pydantic has a Solid Foundation
33 Async introduction
34 Async for Speed
35 Async for Scalability
36 Synchronous Execution Example
37 Asynchronous Execution Example
38 Skeleton async Program
39 Full Concurrency Weather Client
40 Beanie Quickstart Intro
41 Motor, MongoDB’s Async Driver
42 Beanie Quickstart- Part 1 Classes
43 Beanie Quickstart- Part 2 Connections
44 Beanie Quickstart- Part 3 Inserts
45 Beanie Quickstart- Part 4 Queries
46 Beanie Quickstart- part 5 settings
47 Lightning Review of Beanie
48 Get the Full Story of Beanie
49 Bunnet, the Synchronous Beanie
50 Modeling Introduction
51 Modeling- Relational vs. Documents
52 To Embed or not to Embed
53 What is an Integration Database
54 Looking for More Guidance
55 PyPI Api Introduction
56 Recall- Importing the Data
57 Review- The Data Model
58 Creating the DB Models
59 Configuring Collections from Beanie
60 Connecting to MongoDB
61 CLI Skeleton
62 ClI REPL
63 Summary Stats
64 Recent Packages
65 Finding Packages and Releases
66 Creating a Release
67 Concurrency Safe Create Release
68 Creating Users
69 Setting the User’s Password
70 FastAPI Introduction
71 FastAPI Skeleton App
72 API Endpoints Ready
73 Package Details Implementation
74 Sometimes API focused models are required
75 Stats API
76 The Home Page Doesn’t Belong in the API Docs
77 Static Files- CSS
78 Introduction to DB Performance
79 Levers and Knobs of MongoDB Performance
80 Creating Indexes in the Shell
81 Our First Python to MongoDB Index
82 Releases Counted in 1ms
83 Uniqueness Index for Users
84 Projections for Packages
85 Concept- Projections in Beanie
86 Document Design from a Performance Perspective
87 Hosting Introduction
88 Don’t Do What These Companies Did with MongoDB
89 MongoDB as a Service Options
90 MongoDB’s Security Checklist
91 Getting the Server Ready
92 Limit Network Access with VPCs and Firewall
93 Creating an Encryption Key
94 Installing MongoDB_2
95 Configuring MongoDB, Part 1
96 Adding Authentication to MongoDB
97 Connecting to Production MongoDB with Python
98 Importing Data Introduction for Production MongoDB
99 Connecting to a Remote MongoDB
100 Testing our Python Code in Production
101 Final Comments on Speed
102 Load Testing Introduction
103 Introducing Locust
104 Consider a Real Server Topology
105 Running Locust for Max RPS
106 Running Locust for Max Users
107 Faster Locust Tests
108 Finish Line!
109 Git the Source Code, Again
110 Final Review
111 Stay in Touch

Homepage