A Python package for generating quizzes from text, URLs, or YouTube transcripts using OpenAI.
Project description
QuizGPT
QuizGPT is a Python package for generating quizzes from raw text, web pages, or YouTube video transcripts using OpenAI models.
Features
- Extracts content from URLs or plain text.
- Supports YouTube transcript extraction and web page scraping.
- Generates multiple choice quizzes with easy/medium/hard difficulty.
- Provides a concise summary of the source content.
- Exposes both a Python API and a CLI.
Installation
pip install quizgpt
Quick Usage
from quizgpt import QuizGPT
generator = QuizGPT(api_key="YOUR_OPENAI_API_KEY")
result = generator.generate_quiz(
input_text="https://example.com/article",
difficulty="medium",
question_type="mcq"
)
print(result["quiz"])
print(result["short"])
generator = QuizGPT(api_key="YOUR_OPENAI_API_KEY") result = generator.generate_quiz( input_text="https://example.com/article", difficulty="medium", question_type="mcq" ) print(result["quiz"]) print(result["short"])
## CLI Usage
```bash
quizgpt --input "https://example.com/article" --api-key YOUR_OPENAI_API_KEY
Requirements
- Python 3.9+
- OpenAI API key
Development
git clone <repository-url>
cd quizgpt
python -m pip install -e .
python -m pytest
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
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 quizgpt-3.3.1.tar.gz.
File metadata
- Download URL: quizgpt-3.3.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d42074d2b6a529de7b3102a484b14e8065f30b154411ddf539c25a4d6161d2d
|
|
| MD5 |
522a3bae9ad1c59b466ae38f5643f7ff
|
|
| BLAKE2b-256 |
17748f639b467b286225dc6d38546c6e634bc2cbb06644e0f18292d3697bf14b
|
File details
Details for the file quizgpt-3.3.1-py3-none-any.whl.
File metadata
- Download URL: quizgpt-3.3.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bbdc985c4b4becc4270d54d0c82af173eef5ff5651575e0796e9a2d0f949a90
|
|
| MD5 |
2b8dd39c815f5f19dc5c7ce5092fef79
|
|
| BLAKE2b-256 |
b51876600779cd3815631bfda1c2515854ba64b62646ce014061cddb391d17fd
|