A Python application that provides daily inspirational quotes to brighten your day.
This project is a Python-based application that delivers a fresh, inspiring quote every day. It's designed to provide users with daily motivation and wisdom through carefully curated quotes.
- Daily refreshed quotes
- Simple and easy to use interface
- Collection of inspirational quotes
- Python-powered functionality
- Clone the repository
git clone https://github.com/ktcodes-tech/daily-quote-python.git- Navigate to the project directory
cd daily-quote-python- Install required dependencies
pip install -r requirements.txtTo run the application:
python src/main.pydaily-quote-python/
├── src/
│ └── main.py
├── tests/
│ └── test_main.py
├── requirements.txt
└── README.md
How to run the program locally
- Ensure you have Python 3.7+ installed.
- From the project root run one of:
- If the main script is in src/: python src/main.py
- If the main script is at the project root: python main.py
- Common flags:
- --refresh (or -r) : fetch quotes from remote and update local cache
- --all (or -a) : print all cached quotes
- --date YYYY-MM-DD (or -d) : show quote for a specific date
Examples:
# Print today's quote
python src/main.py
# Force refresh from remote and print today's quote
python src/main.py --refresh
# Show all cached quotes
python src/main.py --all
# Show quote for a specific date
python src/main.py --date 2025-01-01Remote API endpoint
- The application fetches quotes from: https://type.fit/api/quotes
- Quick curl example:
curl -s https://type.fit/api/quotes | jq '.[0]'(If jq is not installed, curl the URL and inspect the raw JSON.)
Running tests
- If the project includes tests (tests/), run with pytest or unittest:
# Using pytest (recommended if available)
pytest
# Or using unittest discovery
python -m unittest discover -vTroubleshooting
- If the app fails to fetch quotes, run with --refresh to attempt to update the local cache; check network connectivity and that the endpoint is reachable.
- If you see "No quotes available" make sure a cache exists at ./quotes.json or run --refresh to populate it.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- @ktcodes-tech
- @sahamidfathi
- Thanks to all contributors
- Inspired by the need for daily motivation