elastic / elastic-transport-python

Transport classes and utilities shared among Python Elastic client libraries
https://elastic-transport-python.readthedocs.io
Apache License 2.0
20 stars 13 forks source link

Expose TransportApiResponse #145

Closed pquentin closed 7 months ago

pquentin commented 9 months ago

The documented way to call perform_request on a node is to expect a tuple in response, Tuple[ApiResponseMeta, bytes]. But the actual underlying type is TransportApiResponse:

class TransportApiResponse(NamedTuple):
    meta: ApiResponseMeta
    body: Any

As pointed out by @ywangd, It would make sense to expose it alongside other responses types and change the Nodes docs page to use it.

JessicaGarson commented 7 months ago

Opened a PR here. I have some linting issues it seems. Should I be using Black for formatting?

JessicaGarson commented 7 months ago

I figured out the formatting issues!