pyquotegen - Simple Quote Generator Python Package โจ
pyquotegen
is a Python package that allows you to generate random quotes or quotes from specific categories. It provides a simple and straightforward way to incorporate quotes into your Python applications. ๐
Installation โ๏ธ
You can install pyquotegen
using pip:
pip install pyquotegen
Usage ๐
Hereโs an example of how to use pyquotegen
:
import pyquotegen
# Get a random quote
quote = pyquotegen.get_quote()
print(quote)
# Get a quote by specific category
quote_by_category = pyquotegen.get_quote("inspirational")
print(quote_by_category)
The pyquotegen
package provides the get_quote()
function, which returns a random quote. You can optionally specify a category to get a quote from that specific category. If no category is provided, a quote from any category will be returned. ๐
Functions ๐
get_quote(category: Optional[str] = None) -> str
This function returns a random quote. If a category is specified, it returns a random quote from that category. If no category is provided, a quote from any category will be returned. ๐
Parameters ๐
-
category
(optional): A string specifying the category of the quote. Available categories include โinspirationalโ, โfunnyโ,โmotivationalโ. If no category is provided, the function will return a quote from any category. ๐๏ธ
Returns ๐ค
A string containing the quote. ๐ฌ
Categories ๐๏ธ
pyquotegen
provides quotes in the following categories:
-
motivational
-
friendship
-
technology
-
inspirational
-
funny
-
nature
-
success
-
attitude
-
coding
You can pass any of these categories as an argument to the get_quote()
function to get a quote from that specific category. If you donโt specify a category, a random quote from any category will be returned. ๐ฏ
Features
- Generates random quotes
- Provides quotes by specific category
- Supports multiple categories
- Lightweight and easy to use
Contributing ๐ค
We welcome contributions to pyquotegen
! If you encounter any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request on the GitHub repository. ๐
To contribute to pyquotegen
, follow these steps:
- Fork the repository on GitHub.
- Create a new branch with a descriptive name for your feature or bug fix.
- Make the necessary changes and ensure that the tests pass.
- Submit a pull request to the
main
branch of the original repository. ๐ ๏ธ
We appreciate your contributions, whether itโs bug fixes, feature enhancements, or documentation improvements. ๐
License ๐
This package is distributed under the MIT License. See the LICENSE file for more information. ๐
Acknowledgements ๐
The quotes used in pyquotegen
are sourced from various public domain collections and online resources. We acknowledge and appreciate the authors and contributors of these quotes. ๐
If you have any questions or need further assistance, please donโt hesitate to reach out. ๐ก