Skip to main content

Un module pour créer facilement un jeu de quiz

Project description

Quizen

🎉 Quizen is an interactive console application designed to simplify the creation of Quiz Games. With a well-structured dictionary, you can set up a quiz in just 3 lines of code!

🚀 Aimed at both beginners and advanced developers, Quizen offers an intuitive way to integrate educational and entertaining quizzes into your Python projects.

PyPI Python License PyPI - Downloads


⚙️ Features

  • 🧩 Customizable: Easily create questions and answers using dictionaries.
  • 🎯 Engaging Gameplay: Automatic handling of scores, lives, and consecutive correct answers.
  • 💾 Data Persistence: Player statistics are saved to a file for review.
  • 🔀 Shuffling: Randomize questions and answers to keep things fresh.

📦 Installation

Install the latest version of Quizen from PyPI:

pip install quizen  

🛠 How to Use

Using Quizen is as simple as this:

Step 1: Create your questions

Prepare your questions in a JSON file or Python dictionary. For example:

{
    "What is the capital of France?": ["Paris", "London", "Berlin", "Madrid"],
    "Who developed Python?": ["Guido van Rossum", "Dennis Ritchie", "James Gosling", "Bjarne Stroustrup"]
}

Step 2: Launch your quiz

Here's a complete example to start a quiz:

from quizen import Quiz  
from json import load  

path = "data/questions.json"  

with open(path, "r", encoding="utf-8") as file:  
    questions = load(file)  

Quiz(questions, player="John").play()  

📊 Statistics

At the end of each game, Quizen displays and saves player statistics, including:

  • Questions answered
  • Correct answers
  • Wrong answers
  • Score
  • Longest streak of correct answers
  • Remaining lives

🛡 Dependencies

Quizen depends on the following libraries:

  • rich: For beautiful console output.

Install all dependencies automatically with:

pip install quizen  

🏆 Contributing

We welcome contributions! Here's how you can help:

  1. Report bugs: Found a bug? Let us know by opening an issue.
  2. Suggest improvements: Have ideas for new features? Share them on GitHub.
  3. Submit pull requests: Fix a bug or implement a feature and submit your PR.

Start by cloning the repository:

git clone https://github.com/Tostenn/Quizen.git  
cd quizen  

📣 Get in Touch

Your feedback is invaluable! If you encounter issues, have suggestions, or want to contribute, feel free to:

  • Open an issue on GitHub.
  • Contact me directly through my GitHub profile.

Let’s make Quizen the ultimate tool for interactive quizzes!


Enjoy using Quizen and happy coding! 😊

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

quizen-0.2.2.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

quizen-0.2.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file quizen-0.2.2.tar.gz.

File metadata

  • Download URL: quizen-0.2.2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for quizen-0.2.2.tar.gz
Algorithm Hash digest
SHA256 fcbdb8109031ef6f5b806c98fe08c087a530a129ef258e609473d6c581ea98f4
MD5 ea4ca0702c036763c9325eee1ae41d1d
BLAKE2b-256 f594b6a4925eabf84ce85bd4633b05c77d33a005a0357b5bdaddb9a2288e0bbe

See more details on using hashes here.

File details

Details for the file quizen-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: quizen-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for quizen-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 44a5ae5c36c582a4f44d2be03e521ac87abe1cceac03fc44f6ce95cabbb7c3e3
MD5 866b4645af3aedc8b0c6bc4677595fd5
BLAKE2b-256 0427587314ea79833ea34051832684444951981cf28d57516998aca068218389

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