Spaces:
Paused
Coding Interview
Use the password supplied by your interviewer. Keep your work in the repository already open in the editor:
/home/coder/workspace
Python environment
Python 3.12 is ready, and this project uses uv for dependency and environment management:
pyproject.tomllists the direct dependencies available for the exercise.uv.lockrecords the exact resolved dependency versions..venvcontains the active virtual environment.
Useful checks:
pwd
python --version
uv --version
uv tree
git status
Add a dependency with:
uv add <package>
After editing pyproject.toml manually, synchronize the environment with:
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:
uv run uvicorn main:app --host 127.0.0.1 --port 8000 --reload
The first choice is to view Swagger UI inside the editor:
Open the Command Palette with Ctrl/Cmd+Shift+P.
Run Browser: Open Integrated Browser. In some editor versions, the command may be named Simple Browser: Show.
Open:
http://127.0.0.1:8000/docs
ReDoc is available at:
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:
/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:
ngrok http 8000
ngrok prints a public HTTPS URL. Append /docs to that URL to open Swagger UI, for example:
https://<generated-address>.ngrok.app/docs
If ngrok asks for authentication and an authtoken was supplied for the interview, configure it once and retry:
ngrok config add-authtoken <token>
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.