aas_client3_2.requests_transport
Send the requests through a requests.Session.
Install it with the extra aas-client3.2[requests]. The session is passed in by
the user, so the session also carries the authentication, proxies, certificates
etc.:
import requests
from aas_client3_2 import http
from aas_client3_2 import requests_transport
session = requests.Session()
session.auth = ("user", "password")
server = http.Server(
transport=requests_transport.RequestsTransport(session),
base_url="https://example.com/api/v3.2",
)
- class aas_client3_2.requests_transport.RequestsTransport(session: Session, timeout: float = 30.0, chunk_size: int = 65536)[source]
Send the requests through a
requests.Session.- __init__(session: Session, timeout: float = 30.0, chunk_size: int = 65536) None[source]
Initialize with the given values.
- send(request: Request) Iterator[StreamedResponse][source]
Send the request, and give the response with the body in chunks.