docarray.array.mixins.post module#

class docarray.array.mixins.post.PostMixin[source]#

Bases: object

Helper functions for posting DocumentArray to Jina Flow.

post(host, show_progress=False, batch_size=None, parameters=None, **kwargs)[source]#

Posting itself to a remote Flow/Sandbox and get the modified DocumentArray back

Parameters:
  • host (str) – a host string. Can be one of the following: - grpc://192.168.0.123:8080/endpoint - ws://192.168.0.123:8080/endpoint - http://192.168.0.123:8080/endpoint - jinahub://Hello/endpoint - jinahub+docker://Hello/endpoint - jinahub+docker://Hello/v0.0.1/endpoint - jinahub+docker://Hello/latest/endpoint - jinahub+sandbox://Hello/endpoint

  • show_progress (bool) – if to show a progressbar

  • batch_size (Optional[int]) – number of Document on each request

  • parameters (Optional[Dict]) – parameters to send in the request

Return type:

DocumentArray

Returns:

the new DocumentArray returned from remote