# Python Fastapi Todo App

> Creates a simple Todo REST API with FastAPI, SQLite, and basic CRUD operations. Use when the user asks to create a todo app, task manager API, or a simple Python REST API with create/read/update/delete endpoints.

- **Type:** Skill
- **Install:** `agentstack add skill-andersonamaral2-claude-code-to-deep-agents-skills-converter-codex-output`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [andersonamaral2](https://agentstack.voostack.com/s/andersonamaral2)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [andersonamaral2](https://github.com/andersonamaral2)
- **Source:** https://github.com/andersonamaral2/Claude-Code-to-Deep-Agents-Skills-Converter/tree/main/examples/codex-output

## Install

```sh
agentstack add skill-andersonamaral2-claude-code-to-deep-agents-skills-converter-codex-output
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Skill: Python FastAPI Todo App

> Creates a simple Todo API with FastAPI, SQLite, and basic CRUD operations.

## When to use

When the user asks to create a todo app, task manager API, or simple REST API with Python.

## Steps

First, make sure Python 3.11+ is installed. On macOS use `brew install python@3.11`, on Linux use `apt-get install python3.11`.

Create the project directory and initialize a virtual environment:

```bash
mkdir -p todo-api/app
cd todo-api
python3 -m venv venv
source venv/bin/activate
```

Install the dependencies:

```bash
pip install fastapi uvicorn sqlalchemy
```

Create the file `app/database.py`:

```python
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

DATABASE_URL = "sqlite:///./todos.db"

engine = create_engine(DATABASE_URL, connect_args={"check_same_thread": False})
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()
```

Create the file `app/models.py`:

```python
from sqlalchemy import Column, Integer, String, Boolean
from .database import Base

class Todo(Base):
    __tablename__ = "todos"

    id = Column(Integer, primary_key=True, index=True)
    title = Column(String, index=True)
    description = Column(String, default="")
    completed = Column(Boolean, default=False)
```

Create `app/main.py` with the FastAPI app, including these endpoints:

- `GET /todos` — list all todos
- `POST /todos` — create a new todo
- `PUT /todos/{id}` — update a todo
- `DELETE /todos/{id}` — delete a todo

The app should read `$API_HOST` and `$API_PORT` from the environment for the server bind address.

Add the project conventions to `AGENTS.md` at the root (Codex reads `AGENTS.md` for persistent project context).

Test the API:

```bash
curl http://localhost:8000/todos
```

```bash
curl -X POST http://localhost:8000/todos -H "Content-Type: application/json" -d '{"title": "Buy milk", "completed": false}'
```

For each endpoint, run a quick smoke test to make sure it returns 200.

## Notes

- Keep it simple, no auth needed
- Use SQLite so there's no external database dependency
- Add a `.env` with `API_HOST=0.0.0.0` and `API_PORT=8000`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [andersonamaral2](https://github.com/andersonamaral2)
- **Source:** [andersonamaral2/Claude-Code-to-Deep-Agents-Skills-Converter](https://github.com/andersonamaral2/Claude-Code-to-Deep-Agents-Skills-Converter)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-andersonamaral2-claude-code-to-deep-agents-skills-converter-codex-output
- Seller: https://agentstack.voostack.com/s/andersonamaral2
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
