Skip to main content

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"
        }]
    }
}]

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_size setting and default it to 200 [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]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guillotina_batch-5.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

guillotina_batch-5.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file guillotina_batch-5.0.1.tar.gz.

File metadata

  • Download URL: guillotina_batch-5.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for guillotina_batch-5.0.1.tar.gz
Algorithm Hash digest
SHA256 dbda6ebd66c02607cd4bf662b801e7bd634db6252d37eb8881b2c8b877413388
MD5 f397e867367f99e3a6e4372d3f8e3518
BLAKE2b-256 0aab7066043e52d5fa5aec4976615d1fa139e0b7eb37b1920b26bc6ce659c844

See more details on using hashes here.

File details

Details for the file guillotina_batch-5.0.1-py3-none-any.whl.

File metadata

  • Download URL: guillotina_batch-5.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for guillotina_batch-5.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52ec121ddb86c578309546b819b0ff5f6de1a10cbf23d160d098de6be671a31f
MD5 8fc8d794eac2fc6f6371b21d8bf27b87
BLAKE2b-256 867ff5406f68a6ee57c0ed2d96e19d3569018e3997c85e888e1e8235da3e0962

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page