{"id":35800058,"url":"https://github.com/crunchloop/python-interview","last_synced_at":"2026-01-07T11:01:12.058Z","repository":{"id":321828688,"uuid":"1087247810","full_name":"crunchloop/python-interview","owner":"crunchloop","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-31T18:22:39.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-31T20:20:10.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crunchloop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-31T15:46:38.000Z","updated_at":"2025-10-31T18:22:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/crunchloop/python-interview","commit_stats":null,"previous_names":["crunchloop/python-interview"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/crunchloop/python-interview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crunchloop%2Fpython-interview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crunchloop%2Fpython-interview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crunchloop%2Fpython-interview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crunchloop%2Fpython-interview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crunchloop","download_url":"https://codeload.github.com/crunchloop/python-interview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crunchloop%2Fpython-interview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28234796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-07T02:00:05.975Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-07T11:00:24.656Z","updated_at":"2026-01-07T11:01:12.041Z","avatar_url":"https://github.com/crunchloop.png","language":"Python","readme":"# python-interview / TodoAPI\n\n[![Open in Coder](https://dev.crunchloop.io/open-in-coder.svg)](https://dev.crunchloop.io/templates/fly-containers/workspace?param.Git%20Repository=git@github.com:crunchloop/python-interview.git)\n\nThis is a simple Todo List API built with FastAPI and Python 3.13+. This project is currently being used for Python full-stack candidates.\n\n## Features\n\n- **FastAPI** - Modern, fast web framework for building APIs\n- **Python 3.13+** - Latest Python with full type hints\n- **Pydantic v2** - Data validation using Python type annotations\n- **In-memory storage** - Simple data persistence (resets on restart)\n- **Poetry** - Modern dependency management\n- **pytest** - Comprehensive unit tests with mocking\n- **Ruff** - Extremely fast Python linter and formatter\n- **mypy** - Static type checker with strict mode\n- **DevContainer** - VS Code development container support\n\n## Prerequisites\n\n- Python 3.13+ or Docker with VS Code DevContainer support\n- Poetry (if running locally without Docker)\n\n## Installation\n\n### Using Poetry (Local)\n\n```bash\n# Install Poetry if you haven't already\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# Install dependencies\npoetry install\n\n# Activate virtual environment\npoetry shell\n```\n\n### Using DevContainer (Recommended)\n\n1. Open the project in VS Code\n2. Install the \"Dev Containers\" extension\n3. Press `F1` and select \"Dev Containers: Reopen in Container\"\n4. Dependencies will be installed automatically\n\n## Running the app\n\n### Development mode with hot reload\n\n```bash\n# Using Poetry\npoetry run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000\n\n# Or if inside poetry shell\nuvicorn app.main:app --reload --host 0.0.0.0 --port 8000\n```\n\n### Production mode\n\n```bash\npoetry run uvicorn app.main:app --host 0.0.0.0 --port 8000\n```\n\nThe API will be available at:\n- **API**: http://localhost:8000\n- **Interactive API docs (Swagger)**: http://localhost:8000/docs\n- **Alternative API docs (ReDoc)**: http://localhost:8000/redoc\n\n## API Endpoints\n\nAll endpoints are prefixed with `/api/todolists`:\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| GET | `/api/todolists` | Get all todo lists |\n| GET | `/api/todolists/{id}` | Get a specific todo list |\n| POST | `/api/todolists` | Create a new todo list |\n| PUT | `/api/todolists/{id}` | Update an existing todo list |\n| DELETE | `/api/todolists/{id}` | Delete a todo list |\n\n## Testing\n\n```bash\n# Run all tests\npoetry run pytest\n\n# Run tests with coverage\npoetry run pytest --cov=app --cov-report=html\n\n# Run tests in watch mode\npoetry run pytest-watch\n\n# Run tests with verbose output\npoetry run pytest -v\n```\n\n## Code Quality\n\n### Linting and Formatting with Ruff\n\n```bash\n# Check for linting errors\npoetry run ruff check .\n\n# Fix linting errors automatically\npoetry run ruff check --fix .\n\n# Format code\npoetry run ruff format .\n```\n\n### Type Checking with mypy\n\n```bash\n# Run type checker\npoetry run mypy app/\n\n# Run type checker on all files\npoetry run mypy .\n```\n\n## Project Structure\n\n```\n.\n├── app/\n│   ├── __init__.py\n│   ├── main.py              # FastAPI application entry point\n│   ├── models.py            # Pydantic models (schemas)\n│   ├── routers/\n│   │   ├── __init__.py\n│   │   └── todo_lists.py    # TodoList API endpoints\n│   └── services/\n│       ├── __init__.py\n│       └── todo_lists.py    # Business logic and in-memory storage\n├── tests/\n│   ├── __init__.py\n│   └── test_todo_lists.py   # Unit tests for all endpoints\n├── .devcontainer/           # VS Code DevContainer configuration\n├── pyproject.toml           # Poetry dependencies and tool configs\n├── .ruff.toml              # Ruff linter/formatter configuration\n├── mypy.ini                # mypy type checker configuration\n└── README.md\n```\n\n## Development Tools\n\nThis project uses modern Python development tools:\n\n- **Poetry**: Dependency management and packaging\n- **Ruff**: Extremely fast linter and formatter (replaces Black, isort, flake8)\n- **mypy**: Static type checker with strict mode enabled\n- **pytest**: Testing framework with async support\n- **httpx**: HTTP client for testing FastAPI endpoints\n\n## In-Memory Storage\n\nThis application uses in-memory storage (Python lists/dicts). Data will be lost when the application restarts. This is intentional for simplicity and is suitable for interview/demo purposes.\n\nCheck integration tests at: https://github.com/crunchloop/interview-tests\n\n## Contact\n\n- Martín Fernández (mfernandez@crunchloop.io)\n\n## About Crunchloop\n\n![crunchloop](https://s3.amazonaws.com/crunchloop.io/logo-blue.png)\n\nWe strongly believe in giving back :rocket:. Let's work together [`Get in touch`](https://crunchloop.io/#contact).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrunchloop%2Fpython-interview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrunchloop%2Fpython-interview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrunchloop%2Fpython-interview/lists"}