Metadata-Version: 2.0
Name: guillotina-batch
Version: 1.0.3
Summary: batch endpoint for guillotina
Home-page: https://github.com/guillotinaweb/guillotina_batch
Author: Nathan Van Gheem
Author-email: vangheem@gmail.com
License: BSD
Platform: UNKNOWN
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Intended Audience :: Developers
Description-Content-Type: text/markdown
Provides-Extra: test
Requires-Dist: guillotina (>=2.1.5)
Provides-Extra: test
Requires-Dist: pytest (<=3.1.0); extra == 'test'
Requires-Dist: docker; extra == 'test'
Requires-Dist: backoff; extra == 'test'
Requires-Dist: psycopg2; extra == 'test'
Requires-Dist: pytest-asyncio (>=0.8.0); extra == 'test'
Requires-Dist: pytest-aiohttp; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: coverage (==4.0.3); extra == 'test'
Requires-Dist: pytest-docker-fixtures; extra == 'test'
Requires-Dist: asyncpg (==0.15.0); extra == 'test'

# Guillotina Batch Docs

This package simple provides a `@batch` endpoint to Guillotina which
allows you to group multiple requests into one.


## Configuration

Just add a few lines to your config.yml::

  {"applications": ["guillotina_batch"]}


## Usage

The `@batch` endpoint takes a array of batch definitions taking the following parameters:

- method:str
- endpoint:str
- headers:object[str, str]
- payload:object


For example::

```
POST /db/container/@batch [{
    "method": "POST",
    "endpoint": "path/to/object/@sharing",
    "payload": {
        "prinperm": [{
            "principal": "user1",
            "permission": "guillotina.AccessContent",
            "setting": "AllowSingle"
        }]
    }
},{
    "method": "POST",
    "endpoint": "path/to/object2/@sharing",
    "payload": {
        "prinperm": [{
            "principal": "user1",
            "permission": "guillotina.AccessContent",
            "setting": "AllowSingle"
        }]
    }
}]

```

1.0.3 (2018-06-27)
------------------

- Including parent request's security in batched view [lferran]


1.0.2 (2018-06-27)
------------------

- try again


1.0.1 (2018-06-13)

- markdown fix


## 1.0.0 (2018-06-11)

- Initial release
  [vangheem]


