{
  "markdown": "# Gemini FastAPI Extension\n\nA comprehensive extension for Google Gemini (Antigravity) that provides expert-level FastAPI development rules, commands, and project structures.\n\nThis extension is designed to help you build high-performance, maintainable, and modern APIs with FastAPI, Python, and SQLModel.\n\n## 🚀 Features\n\n- **Standardized Project Structures**: Automatically initialize simple (component-based) or modular (feature-based) FastAPI project layouts.\n- **Migration Helper**: Reconstruct an existing project structure into a modular one automatically.\n- **AI Expert Rules**: Pre-configured guidelines for dependency injection, type hinting, pydantic 2.0, and async/await best practices.\n- **Smart Commands**:\n  - `init-structure`: Bootstrap a new FastAPI project structure.\n  - `init-modules-structure`: Bootstrap or migrate a FastAPI project into a modular (feature-based) structure.\n  - `create-model`: Generate SQLModel database models quickly.\n  - `create-schema`: Generate Pydantic request/response schemas.\n  - `add-endpoint`: Quickly add new API endpoints with routers.\n  - `add-to-main`: Helper to register routers in the main application.\n  - `create-crud`: Generate a full module (models, schemas, service, router) with CRUD operations.\n\n## 📦 Installation\n\nTo use this extension, copy this directory into your Gemini extensions folder or point your Gemini configuration to this directory.\n\n```bash\n# Clone the repository\ngit clone git@github.com:Sanjarbek17/gemini-fastapi-extension.git\n```\n\n## 🛠 Usage\n\nOnce the extension is active, you can use the commands directly in your Gemini chat.\n\nExample command:\n> \"Use the fastapi extension to initialize a new project structure.\"\n\n## 📂 Project Structure\n\nThis extension suggests and automates the following structure:\n```text\n.\n├── app/\n│   ├── api/\n│   │   └── v1/\n│   │       ├── api.py          # Main router including all routers\n│   │       └── endpoints/      # Individual feature routers\n│   ├── core/\n│   │   ├── config.py           # Settings (Pydantic Settings)\n│   │   └── security.py         # Auth utilities\n│   ├── db/\n│   │   ├── session.py          # Engine and session creation\n│   │   └── base.py             # Base class for models\n│   ├── models/                 # DB models (SQLModel/SQLAlchemy)\n│   ├── schemas/                # Pydantic schemas (Request/Response)\n│   ├── crud/                   # CRUD utility functions\n│   └── main.py                 # FastAPI app initialization\n├── tests/                      # Pytest directory\n├── .env                        # Environment variables\n├── alembic/                    # DB migrations\n└── pyproject.toml              # Dependencies (Poetry/Pip/Ruff config)\n```\n\n## 📜 FastAPI Best Practices Included\n\n- **Type Hints**: Mandatory for Pydantic validation and auto-docs.\n- **SQLModel**: Combined ORM and Pydantic models to reduce duplication.\n- **Dependency Injection**: Heavy use of `Depends()` for cleaner logic.\n- **Modern Libraries**: Recommends `sqlmodel`, `pydantic-settings`, and `httpx`.\n\n---\n\nDeveloped by [Sanjarbek17](https://github.com/Sanjarbek17).\n",
  "bytes": 3103,
  "sha": "1c144b83c7337d2f3edb6e2c061a09bfb451da67285e06dd6354e28c21a9a99c",
  "repo_slug": "sanjarbek17/gemini-fastapi-extension",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_sanjarbek17_gemini_fastapi_extension_ad120cf0/readme"
}