This is a Flask application that allows users to manage and automatically generate flashcard decks.
- Clone the repository:
git clone https://github.com/yourusername/flashcard-deck-api.git
- Install the required packages:
pip install -r requirements.txt
- Start the Flask application:
python restful_app.py
a RESTful API for managing flashcard decks.
Retrieves all flashcard decks from the database.
A JSON array of flashcard decks. Each object in the array represents a flashcard deck and has the following properties:
id
: The ID of the flashcard deck.name
: The name of the flashcard deck.cards
: An array of flashcards in the deck. Each object in the array represents a flashcard and has the following properties:question
: The question of the flashcard.answer
: The answer of the flashcard.
Retrieves a specific flashcard deck by its ID.
id
: The ID of the flashcard deck.
A JSON object that represents a flashcard deck and has the following properties:
id
: The ID of the flashcard deck.name
: The name of the flashcard deck.cards
: An array of flashcards in the deck. Each object in the array represents a flashcard and has the following properties:question
: The question of the flashcard.answer
: The answer of the flashcard.
Creates a flashcard in a specific deck.
id
: The ID of the flashcard deck.
A JSON object that represents a flashcard and has the following properties:
question
: The question of the flashcard.answer
: The answer of the flashcard.
A JSON object that represents the created flashcard and has the following properties:
id
: The ID of the flashcard.question
: The question of the flashcard.answer
: The answer of the flashcard.
The application uses MongoDB for data storage. You can configure the MongoDB connection by setting the MONGODB_URI
and MONGODB_PASSWORD
environment variables.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.