~$ python3 Python 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from couchbase.cluster import Cluster, ClusterOptions >>> from couchbase_core.cluster import PasswordAuthenticator >>> >>> cluster = Cluster('couchbase://batman', ClusterOptions(PasswordAuthenticator('Administrator', 'password'))) >>> cb = cluster.bucket('default') >>> cb_coll = cb.default_collection() >>> cb_coll.upsert('u:king_arthur', ... {'name': 'Arthur', 'email': 'kingarthur@couchbase.com', 'interests': ['Holy Grail', 'African Swallows']}) >>> # OperationResult ... >>> print(cb_coll.get('u:king_arthur').content_as[str]) {'name': 'Arthur', 'email': 'kingarthur@couchbase.com', 'interests': ['Holy Grail', 'African Swallows']} >>> # {u'interests': [u'Holy Grail', u'African Swallows'], u'name': u'Arthur', u'email': u'kingarthur@couchbase.com'} ... >>> from couchbase.cluster import QueryOptions >>> row_iter = cluster.query('SELECT name FROM bucket-name WHERE $1 IN interests', QueryOptions(positional_parameters=['African Swallows'])) >>> >>> for row in row_iter: print(row) ... Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/dist-packages/couchbase_core/__init__.py", line 279, in __iter__ next_item = next(parent_iter) File "/usr/local/lib/python3.6/dist-packages/couchbase_core/n1ql.py", line 529, in __iter__ raw_rows = self.raw.fetch(self._mres) couchbase.exceptions.CouchbaseException: , Context={'first_error_code': 3000, 'http_response_code': 400, 'first_error_message': 'syntax error - at bucket', 'statement': 'SELECT name FROM bucket-name WHERE $1 IN interests', 'client_context_id': 'dcecbdc4e464207e', 'query_params': '', 'http_response_body': '', 'endpoint': 'batman:8093', 'type': 'QueryErrorContext'}, Tracing Output={":nokey:0": null}> >>> row_iter = cluster.query('SELECT name FROM bucket-name WHERE $1 IN interests', QueryOptions(positional_parameters=['African Swallows'])) >>> for row in row_iter: print(row) ... Segmentation fault (core dumped)