Skip to main content

This is a movie quote generator

Project description

Overview

The MovieQuotes library is a lightweight Python library designed to generate and manage famous movie quotes. It provides functionality to fetch random quotes, search quotes by movie titles, add new quotes, and list all stored quotes. This is a simple tool for entertainment, this library makes working with movie quotes fun and easy.

Features

  1. Get Random Quote: Fetch a random quote from the predefined database.
  2. Search Quotes by Movie: Find quotes from a specific movie.
  3. Add Custom Quotes: Expand the quote database with your own favorite quotes.
  4. List All Quotes: View the entire collection of stored quotes.

Installation

To install do pip install moviequote-generator

Usage

from moviequote_generator.core import MovieQuotes

  1. Fetch a random quote

random_quote = quotes.get_random_quote() print(f'"{random_quote["quote"]}" - {random_quote["movie"]}')

  1. Search for a Quote by Movie

movie_title = "The Terminator" quote = quotes.get_quote_by_movie(movie_title) if isinstance(quote, list): for q in quote: print(f'"{q["quote"]}" - {q["movie"]}') else: print(quote) # Handles "No quotes found" case

  1. Add a New Quote

quotes.add_quote("I'm walking here!", "Midnight Cowboy") print("New quote added successfully!")

  1. List All Quotes

quotes_list = quotes.list_quotes() for q in quotes_list: print(f'"{q["quote"]}" - {q["movie"]}')

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

moviequote_generator-0.2.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

moviequote_generator-0.2.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file moviequote_generator-0.2.0.tar.gz.

File metadata

  • Download URL: moviequote_generator-0.2.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for moviequote_generator-0.2.0.tar.gz
Algorithm Hash digest
SHA256 475987fb0e3bd465bfecbe2458e6cf569813d07d47185b96c5d13f629c8abd6f
MD5 40e4c6b7049a2bee77373ac5098339e8
BLAKE2b-256 487454f022aa562f5c7ca63b14e7b61b4ee09d4c7d997d55b7e5bd4b35403bfd

See more details on using hashes here.

File details

Details for the file moviequote_generator-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for moviequote_generator-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18f53b8ee3a02b610585727c9151fcddb2e073755e021e4ee839d6bd49c96c42
MD5 e79dbdc95a70d8a9863c6bff096eb120
BLAKE2b-256 18133889dced065577c051ab8ec60923221a2fe07739972496dc8204545ec66f

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