A command-line address book application with contact management and note-taking capabilities.
- Contact Management
- Add, delete, and search contacts
- Store phone numbers, emails, and addresses
- Fuzzy search for contacts
- Note Management
- Create, edit, and delete notes
- Tag-based organization
- Search notes by content or tags
- Birthday Management
- Track birthdays
- View upcoming birthdays
- Birthday notifications
- Python 3.8 or higher
- Terminal with curses support
- Clone the repository:
git clone https://github.com/yourusername/address-book.git
cd address-book- Create and activate a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install the package and dependencies:
pip install -e .
pip install -r requirements.txtRun the application using one of these methods:
- Using the installed command:
address-book- Using Python module:
python -m src- Running the main script directly:
python src/main.pyThe project includes comprehensive tests for all handlers. To run the tests:
- Make sure you have all dependencies installed:
pip install -r requirements.txt- Run the tests using pytest:
# Run all tests
pytest
# Run tests with detailed output
pytest -v
# Run tests with print statements visible
pytest -s
# Run tests with coverage report
pytest --cov=src tests/
# Run a specific test file
pytest tests/test_contact_handlers.py
# Run a specific test function
pytest tests/test_contact_handlers.py::test_handle_add_contactThe test suite includes:
- Contact handler tests (adding, editing, deleting contacts)
- Note handler tests (adding, editing, deleting notes and tags)
- Birthday handler tests (adding, showing, and managing birthdays)
- Address handler tests (adding, showing, and managing addresses)
- Use arrow keys (↑↓) to navigate menus
- Press Enter to select an option
- Follow on-screen prompts for input
- Press any key to continue after messages
The application stores data in the following files:
my_address_book.pkl: Contact informationmy_notes.pkl: Notes and tags
If you encounter any issues:
- Make sure your terminal window is large enough
- Check if your terminal supports curses
- Verify Python version (3.8 or higher)
- Ensure all dependencies are installed
- For test-related issues:
- Make sure pytest is installed:
pip install pytest pytest-cov - Check if you're in the correct directory
- Verify that the virtual environment is activated
- Make sure pytest is installed:
This project is licensed under the MIT License - see the LICENSE file for details.