Skip to content

Commit c79a0a5

Browse files
Update generated source code
Generated SDK source code using: - Generator version 3.30.0 - Specification version 1.0.0-dev0.0.36 - Automation (cloudant-sdks) version a21bc0a
1 parent 58f8231 commit c79a0a5

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

README.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
<!--
2+
The example codes and outputs below are generated using the `embedmd` go
3+
package.
4+
5+
https://github.com/campoy/embedmd
6+
7+
You should regenerate the example codes after making any changes to
8+
examples in the test/examples/ folder.
9+
10+
embedmd -w README.md
11+
-->
12+
113
[![Build Status](https://travis-ci.com/IBM/cloudant-python-sdk.svg?branch=master)](https://travis-ci.com/IBM/cloudant-python-sdk)
214
[![Release](https://img.shields.io/github/v/release/IBM/cloudant-python-sdk?include_prereleases&sort=semver)](https://github.com/IBM/cloudant-python-sdk/releases/latest)
315
[![Docs](https://img.shields.io/static/v1?label=Pydoc&message=latest&color=blue)](https://ibm.github.io/cloudant-python-sdk/)
@@ -513,22 +525,44 @@ For sample code on handling errors, see
513525
### Raw IO
514526

515527
For endpoints that read or write document content it is possible to bypass
516-
usage of the built-in models and send or receive a bytes response.
517-
For examples of using byte streams, see the API reference documentation
518-
("Example request as a stream" section).
528+
usage of the built-in object with byte streams.
529+
530+
Depending on the specific SDK operation it may be possible to:
531+
* accept a user-provided byte stream to send to the server as a request body
532+
* return a byte stream of the server response body to the user
533+
534+
Request byte stream can be supplied for arguments that accept the `BinaryIO` type.
535+
For these cases you can pass this byte stream directly to the HTTP request body.
536+
537+
Response byte stream is supported in functions with the suffix of `_as_stream`.
538+
The returned byte stream allows the response body to be consumed
539+
without triggering JSON unmarshalling that is typically performed by the SDK.
540+
541+
The [update document](#3-update-your-previously-created-document) section
542+
contains examples for both request and response byte stream cases.
543+
544+
The API reference contains further examples of using byte streams.
545+
They are titled "Example request as stream" and are initially collapsed.
546+
Expand them to see examples of:
547+
548+
- Byte requests:
549+
- [Bulk modify multiple documents in a database](https://cloud.ibm.com/apidocs/cloudant?code=python#postbulkdocs)
519550

520-
- [Bulk modify multiple documents in a database](https://cloud.ibm.com/apidocs/cloudant?code=python#postbulkdocs)
521-
- [Query a list of all documents in a database](https://cloud.ibm.com/apidocs/cloudant?code=python#postalldocs)
522-
- [Query the database document changes feed](https://cloud.ibm.com/apidocs/cloudant?code=python#postchanges)
551+
- Byte responses:
552+
- [Query a list of all documents in a database](https://cloud.ibm.com/apidocs/cloudant?code=python#postalldocs)
553+
- [Query the database document changes feed](https://cloud.ibm.com/apidocs/cloudant?code=python#postchanges)
523554

524555
### Further resources
525556

526557
- [Cloudant API docs](https://cloud.ibm.com/apidocs/cloudant?code=python):
527558
API reference including usage examples for Cloudant Python SDK API.
528559
- [Pydoc](https://ibm.github.io/cloudant-python-sdk/):
529560
Cloudant Python SDK API Documentation.
530-
- [Cloudant docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudant):
561+
- [Cloudant docs](https://cloud.ibm.com/docs/services/Cloudant?topic=cloudant-overview#overview):
531562
The official documentation page for Cloudant.
563+
- [Cloudant Learning Center](https://developer.ibm.com/clouddataservices/docs/compose/cloudant/):
564+
The official learning center with several useful videos which help you use
565+
Cloudant successfully.
532566
- [Cloudant blog](https://blog.cloudant.com/):
533567
Many useful articles about how to optimize Cloudant for common problems.
534568

0 commit comments

Comments
 (0)