W3Tutorials.net
Toggle Menu
Home
Online Go Compiler
Tutorials
Javascript Tutorials
Python Tutorials
Go Tutorials
Blog
All Posts
Flask and FastAPI Fundamentals
Test your understanding of lightweight Python web frameworks.
1. What type of web framework is Flask?
Full-stack
Micro
Asynchronous
Enterprise
2. Which Python version is the minimum requirement for FastAPI?
3.5
3.6
3.7
3.8
3. In Flask, which decorator defines a URL route?
@route
@app.route
@flask.route
@url
4. FastAPI automatically generates which API documentation tools by default?
Swagger UI only
ReDoc only
Both Swagger UI and ReDoc
None
5. Which command runs a Flask app via the command line (without app.run())?
flask start
flask run
python app.py
flask execute
6. FastAPI is built on top of which ASGI framework?
Django
Starlette
Tornado
Werkzeug
7. Select native features of FastAPI.
Async/await support
Automatic OpenAPI documentation
Built-in ORM
Dependency injection system
8. Which Flask extensions handle database interactions?
Flask-SQLAlchemy
Flask-Migrate
Flask-RESTful
Flask-WTF
9. Which are valid response types in Flask?
JSON
HTML
Plain text
Binary files
10. What are advantages of FastAPI over Flask?
Native async support
Automatic request validation
Smaller learning curve
Built-in WebSocket support
11. Flask includes a built-in ORM for database operations.
True
False
12. FastAPI can only process asynchronous request handlers.
True
False
13. Werkzeug is a dependency of Flask.
True
False
14. What does ASGI stand for (FastAPI's underlying protocol)?
15. Name the Flask function used to return JSON responses (without using dictionaries directly).
Reset
Answered 0 of 0 — 0 correct