Python Essentials is a comprehensive learning repository designed to take you from writing your first line of code to building database-backed applications. It documents a structured journey through core Python concepts, logic building, and real-world implementation.
The code is organized into progressive modules, making it easy to navigate through different concepts:
- 01 Basics: Syntax, comments, and running programs.
- 02 Conditionals: Decision making with
if,elif,else. - 03 Loops: Iteration using
forandwhileloops. - 04 Functions: Reusable code blocks, arguments, and return values.
- 05 Scopes: Understanding local vs. global scope.
- 06 OOP: Object-Oriented Programming principles.
- 07 Decorators: Enhancing functions with decorators.
- 08 Python Project (File Handling): A CLI-based YouTube Manager app that allows users to CRUD (Create, Read, Update, Delete) video details using a local JSON file (
youtube.txt). - 09 Database (SQLite3): An evolution of the YouTube Manager that persists data using Python's built-in
sqlite3module. - 10 Handling APIs: Scripts demonstrating how to interact with external APIs (e.g., fetching random user data).
- 11 YouTube Manager (MongoDB): An advanced version of the manager app connecting to a cloud-based MongoDB cluster using
pymongo.
This repository features three iterations of a "YouTube Video Manager" to demonstrate data persistence evolution:
- File-Based: Uses
jsonmodule to save data to a text file. - SQL-Based: Implements a relational database schema (
videostable) withsqlite3. - NoSQL-Based: Connects to MongoDB Atlas to manage documents in a
ytmanagerdatabase.
- Python 3.x installed.
pymongoinstalled (for Module 11).
- Clone the repository:
git clone [https://github.com/pushtikadia/Python-Essentials.git](https://github.com/pushtikadia/Python-Essentials.git)
- Navigate to the directory:
cd Python-Essentials - Install dependencies (for MongoDB project):
pip install pymongo
- Run a script:
python "08_python_project/youtube_manager.py"
- Language: Python 3
- Databases: SQLite3, MongoDB (NoSQL)
- Libraries:
json,sqlite3,pymongo,requests(for APIs)
Created by Pushti Kadia