couchbase / couchbase/docs-sdk-python

result dont have content_as

Open
#135 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5
Forks
22
Avg merge
8h 32m
Merged PRs (30d)
1

Description

tag::get-func[]

get document function

def get_airline_by_key(key):
print("\nGet Result: ")
try:
result = cb_coll.get(key)
print(result.content_as[str])
except Exception as e:
print(e)

end::get-func[]

result don't have a content_as

print(result)
get_airline_by_key("airline_8091")
Get Result:
ValueResult<rc=0x0, key='airline_8091', value={'type': 'airline', 'id': 8091, 'callsign': 'CBS', 'iata': None, 'icao': None, 'name': 'Couchbase Airways'}, cas=0x1648131ffc710000, flags=0x2000000, tracing_context=0, tracing_output={'s': 'kv:Unknown', 'c': 'b32c447763e2e10d/083941b5d68313f8', 'i': 122044414642305708, 'b': 'travel-sample', 'l': '192.168.1.126:46956', 'r': '192.168.1.123:11210', 't': 2500000}>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the get_airline_by_key documentation snippet and reproduce the shown call against the travel-sample example. Check the Python SDK result API and update the example so its result access matches the available response; done means the example runs without the reported attribute error and displays the airline result.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.