Skip to main content

Summary

Controller that gives users rql read/ write capabilities. To have token authentication, install cubicweb_signedrequest.

Sample usage

Users of this service must perform a HTTP POST request to its endpoint, that is the base url of the CubicWeb application instance appended with the “rqlio/1.0” url path.

The posted data must use the application/json or multipart/form-data. For the application/json MIME type, the posted data must contain a list of pairs of the form (rql_string, rql_args), where:

  • rql_string is any valid RQL query that may contain mapping keys with their usual form

  • rql_args is a dictionary, whose keys are the mapping keys from rql_string, and the values can be:

    • actual values

    • string references to a previous RQL query’s result, with the assumption that the referenced RQL query returns a single line and single column rset; under such conditions, a string reference must be “__rXXX” where XXX is the (0-based) index of the RQL query in the json-encoded list of queries.

The HTTP request’s response (in case where there is no error), is a json-encoded list. Its length is the number of RQL queries in the request, and each element contains the json-encoded result set rows from the corresponding query.

In case of an error, a json object with a reason key will explain the problem.

Python client example using python-requests:

import requests
import json

args = [('INSERT CWUser U: U login %(l)s, U upassword %(p)s',
        {'l': 'Babar', 'p': 'cubicweb rulez & 42'}),

       ('INSERT CWGroup G: G name "pachyderms"', {}),

       ('SET U in_group G WHERE U eid %(u)s, G eid %(g)s',
        {'u': '__r0', 'g': '__r1'})
       ]

resp = requests.post('https://myinstance.example.com/rqlio/1.0'),
                     data=json.dumps(args),
                     headers={'Content-Type': 'application/json'})
assert resp.status_code == 200

Release files for cubicweb-rqlcontroller 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cubicweb-rqlcontroller 1.1.0
File Size Uploaded
cubicweb_rqlcontroller-1.1.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cubicweb-rqlcontroller 1.1.0
File Interpreter ABI Platform
cubicweb_rqlcontroller-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / cubicweb_rqlcontroller-1.1.0.tar.gz

Download URL cubicweb_rqlcontroller-1.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
07a84774d628f6f2630737feda07adbe25d3849efa7a4af7b2725b08b03199a9
BLAKE2b-256 checksum
How to use checksums
9391dc1c1235cef935d8d5aca74a88b3af68b9fb574bf7fb93dffd2d6f7ba5ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / cubicweb_rqlcontroller-1.1.0-py3-none-any.whl

Download URL cubicweb_rqlcontroller-1.1.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b27994761c92388f8072320874b8367aabc502071facb3104625caa51c67d5de
BLAKE2b-256 checksum
How to use checksums
fe86e348c00c29d13aca5277b0dd6d86caa044540c1327be574ae65417200706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.11.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page