Metadata-Version: 2.1
Name: crudapi
Version: 0.1.1
Summary: The easiest way to create your Restful CRUD APIs
Home-page: https://github.com/unmateo/crudapi
Author: Mateo Harfuch
Author-email: mharfuch@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: SQLAlchemy (>=1.3.20,<2.0.0)
Requires-Dist: fastapi (>=0.61.1,<0.62.0)
Requires-Dist: pydantic-sqlalchemy (>=0.0.7,<0.0.8)
Project-URL: Documentation, https://github.com/unmateo/crudapi
Project-URL: Repository, https://github.com/unmateo/crudapi
Description-Content-Type: text/markdown

# CrudAPI: The easiest way to create your CRUD APIs

[![codecov](https://codecov.io/gh/unmateo/crudapi/branch/develop/graph/badge.svg?token=RAKVPGHZU5)](https://codecov.io/gh/unmateo/crudapi)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI version](https://badge.fury.io/py/crudapi.svg)](https://badge.fury.io/py/crudapi)

Combining the power of FastAPI, Pydantic and SQLAlchemy, you'll only have to care about modeling your data and we'll take care of building up a RESTful API for it.

```python
from crudapi import CrudAPI
from crudapi.models.api import BaseAPI
from crudapi.models.orm import BaseORM

from sqlalchemy import Column
from sqlalchemy import String


class BookORM(BaseORM):

    __tablename__ = "books"
    title = Column(String, nullable=False)


crud = CrudAPI(orm_model=BookORM)

```

you'll get, out of the box, a working _crudapi_ with all these working REST endpoints:

- GET: /books
- POST: /books
- GET: /books/\<id>
- PUT: /books/\<id>
- PATCH: /books/\<id>
- DELETE: /books/\<id>

and because CrudAPI subclasses FastAPI you'll also get all the incredible features of this wonderful library.

---

## Development

We use Poetry for packaging and dependency management:

`poetry install`

`poetry shell`

We use Pytest for testing:

`pytest`

You can start a testing server running:

`uvicorn tests.server:app --reload `

