Metadata-Version: 2.4
Name: fastapi-crud-generator
Version: 0.0.1
Summary: CRUD route generator for FastAPI
Project-URL: Homepage, https://github.com/mozgsml/fastapi_crud_generator
Project-URL: Repository, https://github.com/mozgsml/fastapi_crud_generator
Project-URL: Issues, https://github.com/mozgsml/fastapi_crud_generator/issues
Author-email: Nikolai Lukianov <laserwargpt@gmail.com>
License: The MIT License (MIT)
        
        Copyright (c) 2026 Nikolai Lukianov
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
License-File: LICENSE.txt
Keywords: api,crud,fastapi,rest,sqlalchemy,sqlmodel,tortoise
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: fastapi
Requires-Dist: pydantic
Provides-Extra: sqlalchemy
Requires-Dist: sqlalchemy[asyncio]; extra == 'sqlalchemy'
Provides-Extra: sqlmodel
Requires-Dist: sqlmodel; extra == 'sqlmodel'
Provides-Extra: tortoise
Requires-Dist: tortoise-orm>=1.1.7; extra == 'tortoise'
Description-Content-Type: text/markdown

# fastapi-crud-generator

[![Tests](https://github.com/mozgsml/fastapi_crud_generator/actions/workflows/tests.yml/badge.svg)](https://github.com/mozgsml/fastapi_crud_generator/actions/workflows/tests.yml)
[![PyPI](https://img.shields.io/pypi/v/fastapi-crud-generator)](https://pypi.org/project/fastapi-crud-generator/)
[![Python](https://img.shields.io/pypi/pyversions/fastapi-crud-generator)](https://pypi.org/project/fastapi-crud-generator/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.txt)

Adds full CRUD routes to FastAPI without writing schemas, filters, or pagination by hand.
Everything is generated automatically from your ORM model.

```python
from fastapi_crud_generator import CRUDCollection
from fastapi_crud_generator.orm.sqlmodel import SQLModelAdapter

crud = CRUDCollection(orm_adapter=SQLModelAdapter(model=Article, get_session=get_session))
app.include_router(crud.get_router(prefix="/articles", tags=["articles"]))
```

Three lines — and five endpoints are ready with filtering, sorting, and pagination:

```
GET    /articles              ?title=…&published=true&sort=created_at:desc&page=1&per_page=20
GET    /articles/{article_id}
POST   /articles
PATCH  /articles/{article_id}
DELETE /articles/{article_id}
```

## Installation

If SQLModel, SQLAlchemy, or Tortoise is already in your project:

```bash
pip install fastapi-crud-generator
```

To install an ORM together with the package:

```bash
pip install "fastapi-crud-generator[sqlmodel]"
pip install "fastapi-crud-generator[sqlalchemy]"
pip install "fastapi-crud-generator[tortoise]"
```

## Documentation

**[mozgsml.github.io/fastapi_crud_generator](https://mozgsml.github.io/fastapi_crud_generator)**

- [Getting Started](https://mozgsml.github.io/fastapi_crud_generator/guide/getting-started/) — full working example from scratch
- [Schema Generation](https://mozgsml.github.io/fastapi_crud_generator/guide/schema-generation/) — control which fields appear in each schema
- [Nested Resources](https://mozgsml.github.io/fastapi_crud_generator/guide/nested-resources/) — `/threads/{id}/posts/{id}`
- [Custom Adapter](https://mozgsml.github.io/fastapi_crud_generator/custom-adapter/) — connect your own ORM

## License

MIT
