Skip to content
క
kagitha
/
quiz
/
python-tooling
Subscribe
Index
⌘K
JAVA NOTEBOOK · QUIZ 27 · BEGINNER
Python project setup for Java developers
QUESTION 01 / 04
Which file is Python's version of pom.xml?
A
setup.cfg only
B
pyproject.toml
C
requirements.lock
D
package.json
SCORE SO FAR · 0 / 0
Share this quiz ↗
Which file is Python's version of pom.xml?
— pyproject.toml. pyproject.toml holds the project's metadata and dependencies. uv also writes uv.lock with the exact resolved versions.
You ran pip install anthropic, but your code says ModuleNotFoundError. What's the most likely cause?
— It was installed into a different environment than the one running your code. Packages live in an environment. Activate the project's .venv before installing and running, or use uv add and uv run, which always use the project's environment.
What does if __name__ == "__main__": do?
— Runs the block only when the file is executed directly, not when imported. Python sets __name__ to "__main__" for the file you run. Imported modules get their own name, so the block is skipped. It's Python's main method.
Which should you commit to Git?
— pyproject.toml and uv.lock. Commit the project and lock files. .venv is rebuilt with uv sync, and .env holds secrets that must never be committed.
kagitha
Close
✕
Search everything — articles, videos, chapters, agents, books
01
AI
02
Java
03
System Design
04
Series
05
Manga
06
The Lab
07
Videos
08
Quizzes
09
Books
10
Resume