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"
}]
}
}]
Limitations
It won't work with streamed responses.
6.0.0 (2020-06-12)
- Moved to guillotina 6 and python 3.8 [lferran]
5.0.3 (2019-12-02)
- Fix bug: individual errors are returned separately instead of making main request fail. [lferran]
5.0.2 (2019-11-05)
- Add request body validation
- Add request and responses swagger description
- Black and isort
- Fix travis
[lferran]
5.0.1 (2019-11-01)
- Be able to import types
5.0.0 (2019-08-30)
- Upgrade to g5
1.2.1 (2019-06-18)
- restrict compat version
1.2.0 (2019-05-13)
- Provide new
max_batch_sizesetting and default it to200[vangheem]
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]
Release files for guillotina-batch 6.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| guillotina_batch-6.0.0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| guillotina_batch-6.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / guillotina_batch-6.0.0.tar.gz
| Download URL | guillotina_batch-6.0.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad3eedc219a8b9a0511d46c560edd59a9085c3bc0662978e6c3a40d3e1348491
|
|
BLAKE2b-256 checksum How to use checksums |
ec1aea2d5d53793f1fc916e4fd3f17061b910c243bca296ed9144d8a59580e3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|
Release files / guillotina_batch-6.0.0-py3-none-any.whl
| Download URL | guillotina_batch-6.0.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
680c0347728e88864610b123f1ca2f78a1a2401243a22a36de3997efdc24fd2b
|
|
BLAKE2b-256 checksum How to use checksums |
a24e17024c568ac1aa5c1c787882e33e082eeccc9b0c586ebaa71db7ae1a347a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|