No tutorials for Python has no tutorials for Python. I also see that async support for Python is not documented. Also, Java has multi-document transaction but Python does not. It seems there is not enough focus on Python. We have migrated our code to Python but somewhere it feels like it was not a good choice by looking at the state of development and support at forums.

Hi, apologies for the delay in response on the forums - we are currently working to catch up on docs with the platform. I have a big update on async docs in progress that I hope to include with the next release.

Multi-doc transactions are contingent on the C++ transactions library which is under heavy development, and hopefully we will start work on that when our test drivers are ready for Python .

Python is pretty heavily used internally but functionality typically follows the development of libcouchbase which it is based on. Some functionality has only recently been added so it will take a month or two to catch up.

Please reach out again to @AV25242 - perhaps we can increase resources for documentation/tutorials and Python in general.

Let me know if I can help with documentation.

1 Like

@shivshankar_dayal first of all really appreciate your active involvement and suggestions. All of your suggestions are valuable and are well noticed, so please keep providing us feedback.

You are right we dont have a tutorial yet built in for Python, but rest assured like @ellis.breen had mentioned Python is heavily used and is always equally considered important. Its based on the C library which needs to be built first and then Python implementations takes off. In case of transactions that is the case like we had discussed before. Coming back to the tutorial it in our todo list.

Regarding forum postings, we strive to stay on top helping our audiences, our sincere apologies for any delays that you have experienced.

Regarding contributions to docs, experts like you can definitely help us improve the quality. You can do so by going to the document page where you think an update is needed and make a contribution by clicking on the [Edit on GitHub] link available to you on the upper right hand corner. You can also provide us feedback by clicking on [Leave Additional Feedback?] available to you on the lower right hand corner.

Thank you once again for your feedback and patience as we are steering through this making our docs and applications more effective.

I can help with examples as I find them best way by which most people learn. Most of the time documentation is a key factor. As you can see from above discussion that it was a counter-intuitive await. In fact, I had called on_connect but did not await on it as I had no way of clearly understanding the relationship between C library and Python one. I could have spent some more time digging C library but most people usually want stuff to work out of the box.

I would also like to say that Couchbase needs a Rust library both sync and async version. I expect Rust to be more and more popular in web development as time passes and it would be great to have a library. One of the best runtimes which one can use is tokio for Rust. Perhaps you may be working on it internally.

I have been using Couchbase since 2013 when it had only KV and views interface. It is a pretty good database.

Also, is there a possibility of describing schema for a bucket? I may have overlooked it in the docs but it would be nice if we can specify schema for a bucket.

Thanks for the constructive feedback. Yes totally agree documentation is the Key and we internally also have our focus on getting docs current.
You are correct, you would want an out of the box lib.
Little out of context but answering to your question on Rust we have opened up our interest in Rust, may be not as SDK yet but as a REPL tool thats being build using Rust, which is a community supported tool .

Schema for bucket are you talking about something like a ODM ? @ellis.breen any thoughts ?

I think there are some generic JSON ODMs such as marshmallow that can accept, for example, jsonschemas - so this would work for the object marshalling/validation side. You can also use the standalone jsonschema package.

It’s certainly possible to write a simple layer to push object changes on a fulldoc basis (for example, django-couchbase uses a small memcached implementation to do this here: ).
This would probably work reasonably well for small documents, but to capitalise on subdoc operations for larger ones, mutations of data mapped to JSON fields must be captured in both directions. For OOP languages such as Python this might well involve an Active Document object model. Alternatively there are functional models which can capture sequences of mutations on JSON structures (see Prisms and Lenses). This is however much more idiomatic to functional programming languages, although there is at least one library that attempts to implement this - python-lenses.

As far as I’m aware the server itself doesn’t have any schema support, but instead is optimised for dealing with arbitrarily shaped JSON data which allows a great deal of flexibility. I’m not sure if this has been explored in depth - perhaps @AV25242 can provide some insight here?

Additionally, I would note that couchbase-rs is under active development with some high profile contributors - and you are welcome to do the same (this is what couchbase-shell is based on).

At some point I hope we can migrate the C bindings to something more end-user friendly (PyO3 seems like an interesting option) - but this is not yet in our roadmap.