Metadata-Version: 2.1
Name: fastapi-ormar-utilities
Version: 0.0.9
Summary: Small, but usefull library for interaction with Ormar ORM
Home-page: https://github.com/vladisa88/fastapi-ormar-utilities
Author: Vladislav Isakov
Author-email: vladisa88@gmail.com
License: UNKNOWN
Keywords: python,ormar,async,fastapi,pydantic
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
Requires-Dist: pydantic
Requires-Dist: ormar

# FASTAPI-ORMAR-UTILITIES
![](https://www.code-inspector.com/project/19657/score/svg)
## Small package for better interaction with Ormar ORM.

### This package makes your views cleaner

### Features:
* Fully async
* Compatible with FastAPI
* In my opinion Ormar is the best ORM for FastAPI

### Install with pip
```
pip install fastapi-ormar-utilities
```

### Example usage:
```python

from fastapi import APIRouter, Depends
from fastapi_ormar_utilities import Base

from .models import Item # import Ormar model
from .schemas import ItemCreate # import Pydantic model

router = APIRouter()

class ItemService(Base):
    model = Item

@router.get('/')
async def get_items(
    service: ItemService = Depends()
):
    return await service.fetch_all()

@router.post('/')
async def create_item(
    item_data: ItemCreate,
    service: ItemService = Depends()
):
    return await service.create(item_data)
```


