batch endpoint for guillotina
Project description
Guillotina Batch Docs
This package simple provides a @batch
endpoint to Guillotina which
allows you to group multiple requests into one.
By default all the requests use a single transaction that is commited when all
the requests finish successfully. If ?eager-commit=true
is provided, each request
will be committed independently.
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.1.0 (2019-03-11)
- Retry requests automatically on ConflictError (with
eager-commit=True
) [masipcat]
1.0.5 (2018-11-19)
- Added GET param
eager-commit
[masipcat]
1.0.4 (2018-07-06)
- Copy future object from batch request to request
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]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file guillotina_batch-1.1.0.tar.gz
.
File metadata
- Download URL: guillotina_batch-1.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cdb9fe2bd6f18e2bb7145fb652df6d84384e868e8607f3050dfd5cf3e343db3 |
|
MD5 | be3e06b225a7cb27e50542ac236dc6bf |
|
BLAKE2b-256 | 8c2ca39c144f04b209d8c6ba3931f82cfc222f59362533bee720e4f277760ad1 |
File details
Details for the file guillotina_batch-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: guillotina_batch-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18cade0371dc139c92e15e98d3fbd06e15b9a4d5e95c7bf8a7a2b624c124d29f |
|
MD5 | 065b62157433ea3fdcaff03f4c11ad53 |
|
BLAKE2b-256 | d978b93874c0c8ede2d35d2f189a7b1efb6e0d1b920bcbc78bb8f380a482331f |