fastapi-gen


Namefastapi-gen JSON
Version 0.11.1 PyPI version JSON
download
home_pageNone
SummarySet up a modern REST API by running one command.
upload_time2025-10-26 19:32:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords cli fastapi hello world huggingface langchain llama llama.cpp named-entity recognition ner nlp summarization text generation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  
# FastAPI Gen

**Create production-ready FastAPI applications in seconds**

*From simple APIs to LLM-enabled applications, all without build configuration.*

<p align="center">
  <a href="https://github.com/mirpo/fastapi-gen/actions/workflows/test.yml?query=workflow%3Atest+event%3Apush+branch%main">
    <img src="https://github.com/mirpo/fastapi-gen/actions/workflows/test.yml/badge.svg?branch=main" alt="Test Status">
  </a>
  <a href="https://pypi.org/project/fastapi-gen">
    <img src="https://img.shields.io/pypi/v/fastapi-gen?color=%2334D058&label=pypi" alt="PyPI version">
  </a>
  <a href="https://pypi.org/project/fastapi-gen">
    <img src="https://img.shields.io/pypi/pyversions/fastapi-gen.svg?color=%2334D058" alt="Python versions">
  </a>
  <a href="https://pypi.org/project/fastapi-gen">
    <img src="https://img.shields.io/pypi/dm/fastapi-gen?color=blue" alt="Downloads">
  </a>
  <a href="https://github.com/mirpo/fastapi-gen/blob/main/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-green" alt="License">
  </a>
</p>

</div>

## Quick Start

Get a fully functional FastAPI app running in **30 seconds**:

```bash
# Recommended: using uvx (no installation needed)
uvx fastapi-gen my_app
cd my_app && make start
```

**Or install with uv:**
```bash
uv tool install fastapi-gen
fastapi-gen my_app
cd my_app && make start
```

**Or use pip:**
```bash
pip install fastapi-gen
fastapi-gen my_app
cd my_app && make start
```

**That's it!** Open [http://localhost:8000/docs](http://localhost:8000/docs) to see your OpenAPI documentation.

> **Platform Support:** Works on macOS and Linux | [Report Issues](https://github.com/mirpo/fastapi-gen/issues/new)

## Why FastAPI Gen?

**Focus on Code** - Skip boilerplate setup and start building
**Production Ready** - Enterprise patterns and best practices built-in
**Testing Included** - Real test coverage from day one
**Zero Config** - Ready-to-run templates that just work

---

## Templates Overview

<details>
<summary><strong>Hello World</strong> - Perfect for Learning FastAPI</summary>

**Best for:** Learning FastAPI fundamentals and starting new projects

**Key Features:**
- REST API fundamentals with complete CRUD
- Configuration management (pydantic-settings & dotenv)
- Dependency injection and clean architecture
- Background tasks and exception handling
- Input validation and health monitoring
- Complete test coverage

[View Details →](packages/template-hello-world/README.md)

</details>

<details>
<summary><strong>Advanced</strong> - Enterprise Production Template</summary>

**Best for:** Production applications with enterprise features

**Key Features:**
- JWT authentication with registration and login
- Database integration with SQLAlchemy 2.0 async
- Rate limiting and caching system
- WebSocket support and file upload
- Enhanced security and CORS configuration
- Full test suite

[View Details →](packages/template-advanced/README.md)

</details>

<details>
<summary><strong>NLP</strong> - Comprehensive AI Language Processing</summary>

**Best for:** AI applications with natural language processing

**Key Features:**
- 8 NLP capabilities: summarization, NER, generation, QA, embeddings, sentiment, classification, similarity
- Production architecture with startup model loading
- Smart configuration and device auto-detection
- Performance optimized with model caching
- Real AI testing with actual inference

[View Details →](packages/template-nlp/README.md)

</details>

<details>
<summary><strong>LangChain</strong> - Modern LLM Integration</summary>

**Best for:** Applications using LangChain for LLM workflows

**Key Features:**
- Optimized loading with startup caching
- Modern LangChain patterns and best practices
- Smart config with auto device detection
- Production ready with health checks
- Dual endpoints: text generation and question answering

[View Details →](packages/template-langchain/README.md)

</details>

<details>
<summary><strong>Llama</strong> - Local LLM Powerhouse</summary>

**Best for:** Local LLM inference with llama-cpp-python

**Key Features:**
- Local LLM focus optimized for Gemma/Llama GGUF models
- GPU acceleration with auto detection
- Advanced config for context windows and threading
- Production ready with lifecycle management
- Easy setup with auto model download

> **Requirements:** ~4GB model download + 4GB+ RAM

[View Details →](packages/template-llama/README.md)

</details>

---

## Template Comparison

| Template        | Best For              | Complexity | AI/ML | Database | Auth |
| --------------- | --------------------- | ---------- | ----- | -------- | ---- |
| **Hello World** | Learning, Simple APIs | Basic      | No    | No       | No   |
| **Advanced**    | Production Apps       | Medium     | No    | Yes      | Yes  |
| **NLP**         | AI Text Processing    | Advanced   | Yes   | No       | No   |
| **LangChain**   | LLM Workflows         | Advanced   | Yes   | No       | No   |
| **Llama**       | Local LLM             | Advanced   | Yes   | No       | No   |

## What You Get Out of the Box

<div align="center">

**Zero Configuration** • **Production Patterns** • **Complete Testing** • **Code Quality** • **Auto Documentation** • **Deployment Ready**

</div>

**Focus on Your Code, Not Setup**

All dependencies (FastAPI, Pydantic, Pytest, etc.) are preconfigured. Just create and run:

```bash
fastapi-gen my_app   # Create
cd my_app            # Enter  
make start           # Run!
```

**Every Template Includes:**
- Ready-to-run development environment
- Industry-standard project structure
- Comprehensive test suites with examples
- Ruff linting and formatting
- Auto-generated OpenAPI documentation
- Makefile with common development commands

## Installation & Usage

**You'll need to have Python 3.11+ or later version on your local development machine**. We recommend using the latest version. You can use [uv](https://docs.astral.sh/uv/) for Python version management and project workflows.

### Choose Your Template

```bash
# Default (hello_world)
uvx fastapi-gen my_app

# Or specify a template
uvx fastapi-gen my_app --template <template-name>
```

Available templates: `hello_world`, `advanced`, `nlp`, `langchain`, `llama`

### Built-in Commands

Inside the newly created project, you can run:

### `make start`

Runs the app in development mode.<br>
Open [http://localhost:8000/docs](http://localhost:8000/docs) to view OpenAPI documentation in the browser.

The page will automatically reload if you make changes to the code.

### `make test`

Runs tests.<br>
By default, runs tests related to files changed since the last commit.

## License

`fastapi-gen` is distributed under the terms of the [MIT](https://github.com/mirpo/fastapi-gen/blob/main/LICENSE) license.
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fastapi-gen",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "cli, fastapi, hello world, huggingface, langchain, llama, llama.cpp, named-entity recognition, ner, nlp, summarization, text generation",
    "author": null,
    "author_email": "Miroslav Pokrovskii <miroslavpokrovskiy@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a0/de/22279462e8a45d62863ca38045f7588a5081c438ca5adc4bb42f7cfacf69/fastapi_gen-0.11.1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  \n# FastAPI Gen\n\n**Create production-ready FastAPI applications in seconds**\n\n*From simple APIs to LLM-enabled applications, all without build configuration.*\n\n<p align=\"center\">\n  <a href=\"https://github.com/mirpo/fastapi-gen/actions/workflows/test.yml?query=workflow%3Atest+event%3Apush+branch%main\">\n    <img src=\"https://github.com/mirpo/fastapi-gen/actions/workflows/test.yml/badge.svg?branch=main\" alt=\"Test Status\">\n  </a>\n  <a href=\"https://pypi.org/project/fastapi-gen\">\n    <img src=\"https://img.shields.io/pypi/v/fastapi-gen?color=%2334D058&label=pypi\" alt=\"PyPI version\">\n  </a>\n  <a href=\"https://pypi.org/project/fastapi-gen\">\n    <img src=\"https://img.shields.io/pypi/pyversions/fastapi-gen.svg?color=%2334D058\" alt=\"Python versions\">\n  </a>\n  <a href=\"https://pypi.org/project/fastapi-gen\">\n    <img src=\"https://img.shields.io/pypi/dm/fastapi-gen?color=blue\" alt=\"Downloads\">\n  </a>\n  <a href=\"https://github.com/mirpo/fastapi-gen/blob/main/LICENSE\">\n    <img src=\"https://img.shields.io/badge/license-MIT-green\" alt=\"License\">\n  </a>\n</p>\n\n</div>\n\n## Quick Start\n\nGet a fully functional FastAPI app running in **30 seconds**:\n\n```bash\n# Recommended: using uvx (no installation needed)\nuvx fastapi-gen my_app\ncd my_app && make start\n```\n\n**Or install with uv:**\n```bash\nuv tool install fastapi-gen\nfastapi-gen my_app\ncd my_app && make start\n```\n\n**Or use pip:**\n```bash\npip install fastapi-gen\nfastapi-gen my_app\ncd my_app && make start\n```\n\n**That's it!** Open [http://localhost:8000/docs](http://localhost:8000/docs) to see your OpenAPI documentation.\n\n> **Platform Support:** Works on macOS and Linux | [Report Issues](https://github.com/mirpo/fastapi-gen/issues/new)\n\n## Why FastAPI Gen?\n\n**Focus on Code** - Skip boilerplate setup and start building\n**Production Ready** - Enterprise patterns and best practices built-in\n**Testing Included** - Real test coverage from day one\n**Zero Config** - Ready-to-run templates that just work\n\n---\n\n## Templates Overview\n\n<details>\n<summary><strong>Hello World</strong> - Perfect for Learning FastAPI</summary>\n\n**Best for:** Learning FastAPI fundamentals and starting new projects\n\n**Key Features:**\n- REST API fundamentals with complete CRUD\n- Configuration management (pydantic-settings & dotenv)\n- Dependency injection and clean architecture\n- Background tasks and exception handling\n- Input validation and health monitoring\n- Complete test coverage\n\n[View Details \u2192](packages/template-hello-world/README.md)\n\n</details>\n\n<details>\n<summary><strong>Advanced</strong> - Enterprise Production Template</summary>\n\n**Best for:** Production applications with enterprise features\n\n**Key Features:**\n- JWT authentication with registration and login\n- Database integration with SQLAlchemy 2.0 async\n- Rate limiting and caching system\n- WebSocket support and file upload\n- Enhanced security and CORS configuration\n- Full test suite\n\n[View Details \u2192](packages/template-advanced/README.md)\n\n</details>\n\n<details>\n<summary><strong>NLP</strong> - Comprehensive AI Language Processing</summary>\n\n**Best for:** AI applications with natural language processing\n\n**Key Features:**\n- 8 NLP capabilities: summarization, NER, generation, QA, embeddings, sentiment, classification, similarity\n- Production architecture with startup model loading\n- Smart configuration and device auto-detection\n- Performance optimized with model caching\n- Real AI testing with actual inference\n\n[View Details \u2192](packages/template-nlp/README.md)\n\n</details>\n\n<details>\n<summary><strong>LangChain</strong> - Modern LLM Integration</summary>\n\n**Best for:** Applications using LangChain for LLM workflows\n\n**Key Features:**\n- Optimized loading with startup caching\n- Modern LangChain patterns and best practices\n- Smart config with auto device detection\n- Production ready with health checks\n- Dual endpoints: text generation and question answering\n\n[View Details \u2192](packages/template-langchain/README.md)\n\n</details>\n\n<details>\n<summary><strong>Llama</strong> - Local LLM Powerhouse</summary>\n\n**Best for:** Local LLM inference with llama-cpp-python\n\n**Key Features:**\n- Local LLM focus optimized for Gemma/Llama GGUF models\n- GPU acceleration with auto detection\n- Advanced config for context windows and threading\n- Production ready with lifecycle management\n- Easy setup with auto model download\n\n> **Requirements:** ~4GB model download + 4GB+ RAM\n\n[View Details \u2192](packages/template-llama/README.md)\n\n</details>\n\n---\n\n## Template Comparison\n\n| Template        | Best For              | Complexity | AI/ML | Database | Auth |\n| --------------- | --------------------- | ---------- | ----- | -------- | ---- |\n| **Hello World** | Learning, Simple APIs | Basic      | No    | No       | No   |\n| **Advanced**    | Production Apps       | Medium     | No    | Yes      | Yes  |\n| **NLP**         | AI Text Processing    | Advanced   | Yes   | No       | No   |\n| **LangChain**   | LLM Workflows         | Advanced   | Yes   | No       | No   |\n| **Llama**       | Local LLM             | Advanced   | Yes   | No       | No   |\n\n## What You Get Out of the Box\n\n<div align=\"center\">\n\n**Zero Configuration** \u2022 **Production Patterns** \u2022 **Complete Testing** \u2022 **Code Quality** \u2022 **Auto Documentation** \u2022 **Deployment Ready**\n\n</div>\n\n**Focus on Your Code, Not Setup**\n\nAll dependencies (FastAPI, Pydantic, Pytest, etc.) are preconfigured. Just create and run:\n\n```bash\nfastapi-gen my_app   # Create\ncd my_app            # Enter  \nmake start           # Run!\n```\n\n**Every Template Includes:**\n- Ready-to-run development environment\n- Industry-standard project structure\n- Comprehensive test suites with examples\n- Ruff linting and formatting\n- Auto-generated OpenAPI documentation\n- Makefile with common development commands\n\n## Installation & Usage\n\n**You'll need to have Python 3.11+ or later version on your local development machine**. We recommend using the latest version. You can use [uv](https://docs.astral.sh/uv/) for Python version management and project workflows.\n\n### Choose Your Template\n\n```bash\n# Default (hello_world)\nuvx fastapi-gen my_app\n\n# Or specify a template\nuvx fastapi-gen my_app --template <template-name>\n```\n\nAvailable templates: `hello_world`, `advanced`, `nlp`, `langchain`, `llama`\n\n### Built-in Commands\n\nInside the newly created project, you can run:\n\n### `make start`\n\nRuns the app in development mode.<br>\nOpen [http://localhost:8000/docs](http://localhost:8000/docs) to view OpenAPI documentation in the browser.\n\nThe page will automatically reload if you make changes to the code.\n\n### `make test`\n\nRuns tests.<br>\nBy default, runs tests related to files changed since the last commit.\n\n## License\n\n`fastapi-gen` is distributed under the terms of the [MIT](https://github.com/mirpo/fastapi-gen/blob/main/LICENSE) license.",
    "bugtrack_url": null,
    "license": null,
    "summary": "Set up a modern REST API by running one command.",
    "version": "0.11.1",
    "project_urls": {
        "Documentation": "https://github.com/mirpo/fastapi-gen#readme",
        "Issues": "https://github.com/mirpo/fastapi-gen/issues",
        "Source": "https://github.com/mirpo/fastapi-gen"
    },
    "split_keywords": [
        "cli",
        " fastapi",
        " hello world",
        " huggingface",
        " langchain",
        " llama",
        " llama.cpp",
        " named-entity recognition",
        " ner",
        " nlp",
        " summarization",
        " text generation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0af0f908a014b5d02a2856d97eadca308c2828a306801ddb915031f207a85c77",
                "md5": "de5f232f1b2b23950bbb67b2f7bdbb9e",
                "sha256": "2bca82c905a5f9fde76eec10273222abfb56ca7c6de00c24e18b9d9ed444b61d"
            },
            "downloads": -1,
            "filename": "fastapi_gen-0.11.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "de5f232f1b2b23950bbb67b2f7bdbb9e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 62053,
            "upload_time": "2025-10-26T19:32:03",
            "upload_time_iso_8601": "2025-10-26T19:32:03.429731Z",
            "url": "https://files.pythonhosted.org/packages/0a/f0/f908a014b5d02a2856d97eadca308c2828a306801ddb915031f207a85c77/fastapi_gen-0.11.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a0de22279462e8a45d62863ca38045f7588a5081c438ca5adc4bb42f7cfacf69",
                "md5": "194fd104ae3a042e63f1875984e321e3",
                "sha256": "3449f34a7eabd38adadab44fd0dd4e9a63c782331f757ada97b1b57c80c45454"
            },
            "downloads": -1,
            "filename": "fastapi_gen-0.11.1.tar.gz",
            "has_sig": false,
            "md5_digest": "194fd104ae3a042e63f1875984e321e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 41027,
            "upload_time": "2025-10-26T19:32:04",
            "upload_time_iso_8601": "2025-10-26T19:32:04.344314Z",
            "url": "https://files.pythonhosted.org/packages/a0/de/22279462e8a45d62863ca38045f7588a5081c438ca5adc4bb42f7cfacf69/fastapi_gen-0.11.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-26 19:32:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mirpo",
    "github_project": "fastapi-gen#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fastapi-gen"
}
        
Elapsed time: 4.92094s