spring
raw JSON → 5.8.7 verified Sat May 09 auth: no python
Simple Couchbase workload generator built on pylibcouchbase. Version 5.8.7; release cadence is irregular.
pip install spring Common errors
error ImportError: cannot import name 'Spring' ↓
cause Using incorrect import path or case; class is `Spring` not `spring`.
fix
Use
from spring import Spring. error pylibcouchbase.exceptions.AuthError: Authentication failure (LCB_ERR_AUTHENTICATION_FAILURE) ↓
cause Invalid credentials or connection string; missing env variable or wrong format.
fix
Set
COUCHBASE_CONNECTION_STRING to couchbase://user:password@host/bucket. Warnings
breaking Python 2 support dropped after version 4.x. ↓
fix Use Python 3.6 or later.
deprecated The `bucket` parameter is deprecated in favor of `collection`. ↓
fix Use `collection='your_collection'` instead.
gotcha Default connection attempts to local Couchbase unless `COUCHBASE_CONNECTION_STRING` env var is set. ↓
fix Always set the environment variable to avoid accidental localhost connections.
Imports
- Spring wrong
from spring import springcorrectfrom spring import Spring
Quickstart
import os
from spring import Spring
conn_str = os.environ.get('COUCHBASE_CONNECTION_STRING', '')
spring = Spring(connection_string=conn_str)
spring.run()