Skip to content

Latest commit

 

History

History
254 lines (184 loc) · 4.59 KB

File metadata and controls

254 lines (184 loc) · 4.59 KB

📝 Python Notes Manager

A command-line Notes Manager built with Python, Object-Oriented Programming, and JSON file storage.

The application allows users to add, view, search, update, and delete notes while keeping the data permanently stored in a JSON file.

🚀 Features

  • ➕ Add notes
  • 👀 View all notes
  • 🔍 Search notes
  • ✏️ Update notes
  • 🗑️ Delete notes
  • 💾 Persistent JSON storage
  • 🛡️ Input validation
  • 🖥️ Menu-driven command-line interface

🛠️ Technologies Used

  • Python 3
  • Object-Oriented Programming
  • JSON
  • File Handling
  • os module
  • Lists
  • Dictionaries
  • Loops
  • Functions
  • String manipulation
  • Exception Handling

📂 Project Structure

python-notes-manager/
│
├── main.py
├── notes_manager.py
├── notes.json
└── README.md

🧠 How It Works

The program stores each note as a dictionary containing a title and content.

Example:

{
    "title": "Python",
    "content": "Practice JSON and dictionaries"
}

All notes are stored inside a list and saved permanently to notes.json.

📋 Menu

==============================
📝 NOTES MANAGER
==============================
1. Add Note
2. View Notes
3. Search Notes
4. Update Note
5. Delete Note
6. Exit

▶️ How to Run

Make sure Python 3 is installed.

Run:

python main.py

➕ Adding a Note

Example:

Enter note title: Python
Enter note content: Practice JSON and dictionaries

Note added successfully! ✅

👀 Viewing Notes

Example:

===== YOUR NOTES =====
1. Python
   Practice JSON and dictionaries

2. Gym
   Chest workout

🔍 Searching Notes

Users can search for a keyword in the title or content.

Example:

Enter keyword to search: python

===== NOTE FOUND =====
Title   : Python
Content : Practice JSON and dictionaries

The search is case-insensitive, so Python, python, and PYTHON are treated the same.

✏️ Updating a Note

Users can select a note by its number and update its title or content.

Example:

Enter note number to update: 1
Enter new title (Python): Python Practice
Enter new content (Practice JSON and dictionaries): Learn JSON and OOP

Note updated successfully! ✅

🗑️ Deleting a Note

Users can delete a note by selecting its number.

Example:

Enter note number to delete: 2

Deleted: Gym ✅

💾 Data Storage

Notes are permanently stored in notes.json.

Example:

[
    {
        "title": "Python",
        "content": "Practice JSON and dictionaries"
    },
    {
        "title": "DSA",
        "content": "Practice arrays and strings"
    }
]

🧠 Python Concepts Practiced

  • Classes
  • Objects
  • __init__()
  • self
  • Methods
  • Modules
  • Functions
  • return
  • JSON
  • File handling
  • os.path.exists()
  • Lists
  • Dictionaries
  • Nested data structures
  • append()
  • pop()
  • enumerate()
  • len()
  • input()
  • .strip()
  • .lower()
  • in operator
  • Dictionary value updates
  • for loops
  • while loops
  • if/elif/else
  • try/except
  • ValueError
  • Data persistence

🔍 Search

The search feature checks both the title and content of every note.

Example:

Keyword: python

Title: Python Practice
Content: Learn JSON

The note will be found because the keyword exists in the title.

🛡️ Input Validation

The program checks whether the selected note number is valid.

Invalid numbers or non-numeric input are handled without crashing the program.

Example:

Enter note number: abc

Please enter a valid number.

🔮 Future Improvements

  • Add note categories
  • Add timestamps
  • Add note IDs
  • Add favorite notes
  • Add archive functionality
  • Add sorting
  • Add multiple-line note content
  • Add password protection
  • Add search filters
  • Add GUI interface
  • Add database support

⚠️ Note

This project is designed for learning Python programming, Object-Oriented Programming, JSON persistence, searching, updating data, and command-line application development.

👨‍💻 Author

Ayushman Tiwari

GitHub: https://github.com/ayushman-ece

🎯 Learning Goal

This project is part of my Python project practice focused on building real-world applications and strengthening Python programming fundamentals, Object-Oriented Programming, JSON file handling, data persistence, searching, updating, and data management.