【问题标题】:How to create a Couchbase bucket using Python client?如何使用 Python 客户端创建 Couchbase 存储桶?
【发布时间】:2013-01-25 01:10:35
【问题描述】:

查看 Couchbase Python 客户端,我看不到如何指定存储桶类型以创建 couchbase 存储桶类型。

client 不允许您指定存储桶类型。

【问题讨论】:

    标签: couchbase


    【解决方案1】:

    实际上看起来包装器中缺少它,但您应该能够使用以下代码实现这一点:

    couchbase = Couchbase("127.0.0.1:8091", "Administrator", "password")
    #get the rest interface
    rest = couchbase._rest()
    rest.create_bucket(bucket='myBucket',
                       ramQuotaMB=160,
                       authType='sasl',
                       saslPassword='password',
                       replicaNumber=0,
                       bucketType='couchbase')
    

    你可以发送 couchbase 或 memcached

    我将在高级 API 中记录一个错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多