# Coding Interview Use the password supplied by your interviewer. Keep your work in the repository already open in the editor: ```text /home/coder/workspace ``` ## Python environment Python 3.12 is ready, and this project uses **uv** for dependency and environment management: - `pyproject.toml` lists the direct dependencies available for the exercise. - `uv.lock` records the exact resolved dependency versions. - `.venv` contains the active virtual environment. Useful checks: ```bash pwd python --version uv --version uv tree git status ``` Add a dependency with: ```bash uv add ``` After editing `pyproject.toml` manually, synchronize the environment with: ```bash uv sync ``` ## AI coding assistant Claude Code is preconfigured for this interview and uses Claude Opus 4.8. No Anthropic account or separate sign-in is required. Open Claude Code from the activity bar and use it when the interview instructions permit AI assistance. Do not change its provider or model configuration. Prompts and responses may be reviewed as part of the interview. If Claude Code reports an authentication or model error, tell the interviewer rather than starting an account-login flow. ## Run and preview a FastAPI app Assuming the FastAPI application is exposed as `app` in `main.py`, start it in a terminal: ```bash uv run uvicorn main:app --host 127.0.0.1 --port 8000 --reload ``` The first choice is to view Swagger UI inside the editor: 1. Open the Command Palette with **Ctrl/Cmd+Shift+P**. 2. Run **Browser: Open Integrated Browser**. In some editor versions, the command may be named **Simple Browser: Show**. 3. Open: ```text http://127.0.0.1:8000/docs ``` ReDoc is available at: ```text http://127.0.0.1:8000/redoc ``` If the integrated browser does not open the local address, open the current code-server URL in a normal browser tab and append: ```text /proxy/8000/docs ``` ## Optional: expose the API with ngrok Use ngrok only when a service outside the editor must reach your API, such as a webhook provider or an external API client. Keep Uvicorn running, open a second terminal, and run: ```bash ngrok http 8000 ``` ngrok prints a public HTTPS URL. Append `/docs` to that URL to open Swagger UI, for example: ```text https://.ngrok.app/docs ``` If ngrok asks for authentication and an authtoken was supplied for the interview, configure it once and retry: ```bash ngrok config add-authtoken ngrok http 8000 ``` The generated URL is publicly reachable. Do not expose credentials, environment variables, or sensitive data, and stop the tunnel with **Ctrl+C** when it is no longer needed. ## Source control The workspace is already a Git repository on the `main` branch. Make commits at useful milestones and do not commit credentials or access tokens.