For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Blog
DocsAPI Reference
DocsAPI Reference
  • Python SDK
        • Aistore
          • Botocore Patch
          • Mcp
          • Pytorch
          • Sdk
            • Ais Source
            • Archive Config
            • Authn
            • Batch
            • Blob Download Config
            • Bucket
            • Client
            • Cluster
            • Const
            • Dataset
            • Dsort
            • Enums
            • Errors
            • Etl
              • Etl
              • Etl Config
              • Etl Const
              • Etl Templates
              • Webserver
                • Base Etl Server
                • Fastapi Server
                • Fastapi Streaming
                • Flask Server
                • Http Multi Threaded Server
                • Utils
            • Job
            • List Object Flag
            • Lock Poller
            • Multiobj
            • Namespace
            • Obj
            • Provider
            • Request Client
            • Request Executor
            • Response Handler
            • Retry Config
            • Retry Manager
            • Session Manager
            • Types
            • Utils
            • Wait Result
            • Xact Const
          • Version
Blog
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogoAIStore
On this page
  • Module Contents
  • Classes
  • Functions
  • API
Python SDKPythonPythonAistoreSdkEtlWebserver

aistore.sdk.etl.webserver.utils

||View as Markdown|
Previous

aistore.sdk.etl.webserver.http_multi_threaded_server

Next

aistore.sdk.job

Module Contents

Classes

NameDescription
_ResponseRawReaderWrap a requests.Response so close() releases the connection to the pool.

Functions

NameDescription
compose_etl_direct_put_urlCompose the final direct PUT URL by combining components from multiple URLs.
parse_etl_pipelineParse ETL pipeline from header value with validation.
serialize_classPickle and base64-encode a user-provided ETLServer subclass for transmission.

API

class aistore.sdk.etl.webserver.utils._ResponseRawReader(
response: requests.Response
)

Wrap a requests.Response so close() releases the connection to the pool.

resp.raw.close() closes the socket but skips resp.close()‘s release_conn() call, which returns the socket to the keep-alive pool. Under early-close (mid-stream errors, client disconnects), that leaks connections. All reads are delegated to resp.raw; everything else falls through to resp.raw.

_raw
= response.raw
aistore.sdk.etl.webserver.utils._ResponseRawReader.__getattr__(
name
)
aistore.sdk.etl.webserver.utils._ResponseRawReader.close()

Close the response so requests releases the connection to the pool.

aistore.sdk.etl.webserver.utils._ResponseRawReader.read(
args = (),
kwargs = {}
)

Read bytes from the underlying raw response stream.

aistore.sdk.etl.webserver.utils.compose_etl_direct_put_url(
direct_put_url: str,
host_target: str,
obj_path: str
) -> str

Compose the final direct PUT URL by combining components from multiple URLs.

Scenarios:

  1. Pipeline stage: direct_put_url has no path → append object path.
  2. Offline transform: direct_put_url has a path → prepend host_target path (e.g. “/v1/etl/_object/<etl-name>/<etl-secret>/”) to validate request.

Returns: str: Complete direct PUT URL targeting the correct AIS node.

Parameters:

direct_put_url
str

Destination node’s direct PUT URL, possibly with path/query.

host_target
str

Base AIS target URL used for scheme and base path.

obj_path
str

Path of the object to PUT.

aistore.sdk.etl.webserver.utils.parse_etl_pipeline(
pipeline_header: str
) -> typing.Tuple[str, str]

Parse ETL pipeline from header value with validation.

Parameters:

pipeline_header
str

Comma-separated pipeline URLs

Returns: str

Tuple of (first_url, remaining_pipeline_header)

Raises:

  • InvalidPipelineError: If pipeline header is malformed
aistore.sdk.etl.webserver.utils.serialize_class(
cls: typing.Type[aistore.sdk.etl.webserver.base_etl_server.ETLServer],
encoding: str = UTF_ENCODING
) -> str

Pickle and base64-encode a user-provided ETLServer subclass for transmission.

Parameters:

cls
Type[ETLServer]

A subclass of ETLServer to serialize.

encoding
strDefaults to UTF_ENCODING

The string encoding for the Base64 payload.

Returns: str

A Base64 string containing the pickled class.

Raises:

  • TypeError: If cls is not a subclass of ETLServer.