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
- Get Random Quote: Fetch a random quote from the predefined database.
- Search Quotes by Movie: Find quotes from a specific movie.
- Add Custom Quotes: Expand the quote database with your own favorite quotes.
- 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
- Fetch a random quote
random_quote = quotes.get_random_quote() print(f'"{random_quote["quote"]}" - {random_quote["movie"]}')
- 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
- Add a New Quote
quotes.add_quote("I'm walking here!", "Midnight Cowboy") print("New quote added successfully!")
- List All Quotes
quotes_list = quotes.list_quotes() for q in quotes_list: print(f'"{q["quote"]}" - {q["movie"]}')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
475987fb0e3bd465bfecbe2458e6cf569813d07d47185b96c5d13f629c8abd6f
|
|
| MD5 |
40e4c6b7049a2bee77373ac5098339e8
|
|
| BLAKE2b-256 |
487454f022aa562f5c7ca63b14e7b61b4ee09d4c7d997d55b7e5bd4b35403bfd
|
File details
Details for the file moviequote_generator-0.2.0-py3-none-any.whl.
File metadata
- Download URL: moviequote_generator-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18f53b8ee3a02b610585727c9151fcddb2e073755e021e4ee839d6bd49c96c42
|
|
| MD5 |
e79dbdc95a70d8a9863c6bff096eb120
|
|
| BLAKE2b-256 |
18133889dced065577c051ab8ec60923221a2fe07739972496dc8204545ec66f
|