Python & MongoDB with Pure Python REST API – Syllabus
Module 1: Python Foundations (1.5–2 weeks)
- ✅ Python installation & setup (pip, venv)
- ✅ Data types & variables
- ✅ Lists, dicts, sets, tuples
- ✅ Control structures (if, loops)
- ✅ Functions, modules, imports
- ✅ Exception handling
- ✅ File handling (JSON, CSV)
- ✅ Basic OOP in Python
Module 2: MongoDB Basics (1.5 weeks)
- ✅ NoSQL vs SQL, when to use MongoDB
- ✅ Installing MongoDB (local & Atlas)
- ✅ Databases, collections, documents
- ✅ CRUD in Mongo shell
- ✅ MongoDB data types
- ✅ Query operators ($in, $gt, $lt, $or, $and)
- ✅ Indexing basics
Module 3: Python–MongoDB Integration (2 weeks)
- ✅ Install pymongo
- ✅ Connect Python app to MongoDB (local & Atlas)
- ✅ Insert, find, update, delete documents
- ✅ Handling ObjectId in Python
- ✅ Working with nested documents
- ✅ Aggregation pipeline with Python
- ✅ Error handling in DB operations
Module 4: REST API in Pure Python (2.5 weeks)
- ✅ Introduction to HTTP & REST principles
- ✅ Python’s built-in http.server & BaseHTTPRequestHandler
- ✅ Parsing requests (GET, POST, PUT, DELETE)
- ✅ Sending JSON responses using json module
- ✅ Connecting API routes with MongoDB CRUD operations
- ✅ Implement API Endpoints:
- POST /users → Create user
- GET /users → Fetch all users
- GET /users/{id} → Fetch single user
- PUT /users/{id} → Update user
- DELETE /users/{id} → Delete user
- ✅ Testing APIs with Postman
Module 5: Advanced Topics (2 weeks)
- ✅ Input validation in APIs
- ✅ JWT Authentication in pure Python
- ✅ Pagination & filtering queries
- ✅ File upload → store file path / GridFS in MongoDB
- ✅ Async requests with aiohttp + motor (async Mongo driver)
- ✅ Organizing project with MVC-like folder structure
Final Project (1–1.5 weeks)
- ✅ Build a complete User Management REST API in pure Python with MongoDB
- ✅ User signup/login (JWT-based auth)
- ✅ Profile CRUD operations
- ✅ List/search users with filters
- ✅ Aggregation endpoint (e.g., count users by role)
- ✅ API documentation (Markdown / OpenAPI spec manually)
