Skip to main content

DailyQuotes is a simple Python package that generates random quotes including quotes that are well-known, from celebrities, mood-based, and in different languages. This Python package provides an easy way to integrate meaningful quotes into projects, daily routines, or personal motivation.

Project description

CI

An exercise to create a Python package, build it, test it, distribute it, and use it. See instructions for details.

dailyquotes

Contributors:

Aaqila Patel

Andy Cabindol

Lina Sanchez

Maya Mabry

Description:

dailyquotes is a simple Python package that generates random quotes including quotes that are well-known, from celebrities, mood based, and in different languages. This python package provides an easy way to integrate meaningful quotes into projects, daily routines, or personal motivation.

Installation

You can install dailyquotes directly from PyPI

pip install dailyquotes

Features

dailyquotes offers four different features within the package:

1. generate_quote

This function generates a random quote and is perfect for a user who wants an entertaining quote without any specific criteria.

from dailyquotes import generate_quote
quote = generate_quote()
print(quote)
# Output: "The only way to do great work is to love what you do."

2. generate_celebrity_quote

This function allows users to specify a celebrity (ex. musician, politician, historical figure, etc.) and receive a quote attributed to them.

from dailyquotes import generate_celebrity_quote
quote = generate_celebrity_quote("Albert Einstein")
print(quote)
# Output: "Imagination is the light that illuminates the realms of knowledge and discovery."

3. generate_mood_quote

This function allows users to input their mood (ex. happy, sad, excitement), and the function will return a quote that aligns with their emotional state.

from dailyquotes import generate_mood_quote
quote = generate_mood_quote("sad")
print(quote)
# Output: "Even when sorrow clouds the skies, remember that every raindrop has the potential to nurture a seed into a beautiful flower."

4. generate_language_quote

This function generates a quote in a user-specified language (Spanish, French, Greek) which is useful for language learners.

from dailyquotes import generate_language_quote
quote = generate_language_quote("Greek")
print(quote)
# Output: "Η επιμονή είναι η αδερφή της επιτυχίας"

Command Line Usage

dailyquotes can also be used directly from the command line:

# Install the package 
pip install dailyquotes

# Run the CLI
python -m dailyquotes

Example Program

Here is a complete example program that demonstrates all functions:

example.py

Development Setup

If you would like to contribute to dailyquotes, follow these steps:

Prerequisites

  • Python 3.7 or higher
  • pipenv

Environmental Variables

This package requires an OpenAI API Key to generate quotes dynamically.

  • You need to create a .env file and add the API key
  • Contact Andy Cabindol to obtain the .env file with the required API key.

Setup steps

  1. Clone the repository:
git clone https://github.com/software-students-spring2025/3-python-package-package_proj.git

cd 3-python-package-package_proj
  1. Set up the virtual environment and install dependencies:
pipenv install --dev 
pipenv shell
  1. Install the package in development mode:
pipenv install -e .

Running tests

We use pytest for testing. To run the tests:

pytest

Building the package

To build the package:

python -m build

This will generate distribution files in the dist/ directory.

Workflow for contributions

  1. Create a new branch for your feature:
git checkout -b feature/your-feature-name
  1. Make your changes and write tests if necessary

  2. Run tests to ensure everything works:

pytest
  1. Commit your changes and push to your branch
git add . 
git commit -m "Add feature: unique feature description"
git push origin feature/your-feature-name
  1. Create a Pull Request to the 'main' branch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dailyquotes-0.1.1.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dailyquotes-0.1.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file dailyquotes-0.1.1.tar.gz.

File metadata

  • Download URL: dailyquotes-0.1.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for dailyquotes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6780ba526f87289db486a82359e18c702223abf4c2a3e63396ddee3ea48ea5da
MD5 5e56a8f4c2c3384211730a2f0b532c46
BLAKE2b-256 6d31e6091e51ec702180882a5ac3d9fe92ae6b56eb7f8a252aa6995924ab02cf

See more details on using hashes here.

File details

Details for the file dailyquotes-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dailyquotes-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for dailyquotes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56012193ffa26d71b24d0de01d2b9d8f2898d97f7a1e1271575c39d13917b5c0
MD5 e6f561a2679539c04b4bc611026a9acf
BLAKE2b-256 c48f85099dfbc7adcf1ad0c2cebc71053b1fb5ae789e95c65af2b310fbfe6e57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page