Package API: konnect.curl
- exception CurlError(code: int, msg: str)[source]
Bases:
ExceptionAn error exception for Curl transfers
The value of ‘code’ is a Curl CURLE_* value, for instance
CURLE_COULDNT_CONNECT. The value of ‘msg’ is an error message returned bycurl_easy_strerrorwith ‘code’ passed as an argument.
- class Multi[source]
Bases:
objectA wrapper around
CurlMultito bind it with Anyio-supported event frameworksUsers should treat this class as a black-box. Only the
Multi.process(),Multi.get_send_stream()andMulti.get_receive_stream()methods are available. There are no other methods or attributes they should attempt to call or override as doing so will have undefined results.- async process(request: Request) UpdateT | ResultT[source]
Perform a request as described by a Curl instance
- get_send_stream(request: Request) ByteSendStream[source]
Return a writable bytes stream for the upload portion of a transfer
The returned stream object implements
ByteSendStream.
- get_receive_stream(request: Request) ByteReceiveStream[source]
Return a readable bytes stream for the download portion of a transfer
The returned stream object implements
ByteReceiveStream.
- class Time(*values)[source]
Bases:
QuantityUnitUnits for time intervals
- MILLISECONDS = 1
- SECONDS = 1000
- class Url(_src: str, /)[source]
Bases:
strURL strings that can be examined and manipulated
- classmethod from_parts(scheme: str, hostname: str, port: int | str = '', path: str = '', query: QuerySrc = '', fragment: str = '') Self[source]
Create a new URL from component parts
Note
There is no ‘netloc’, ‘username’ or ‘password’ arguments. Credentials should not be encoded in URLs.
- urljoin(other: str, /) Url[source]
Join this URL as a base with a possibly relative URL to form an absolute URL
- urlreplace(scheme: str = '', hostname: str = '', port: int | str = 0, path: str = '', query: QuerySrc = '', fragment: str = '') Url[source]
Replace parts of the URL and return the new URL
Note
Username and password values cannot be replaced, and will be stripped from the new URL. These should not be encoded in URLs.
- queryadd(src: QuerySrc = (), **extra: ParamValue) Url[source]
Add query parameters to the URL and return the new URL
Subpackages
- Package API: konnect.curl.certificates
AsciiArmoredCertificateCertificateFileCertificateSourceCommonEncodedSourceECPrivateKeyEncodedFilePkcs8EncryptedPrivateKeyPkcs8PrivateKeyPkcs12PrivateKeyPrivateKeyFilePrivateKeySourceRSAPrivateKeyadd_ca_certificate()add_client_certificate()- Submodules