MCPcopy Create free account
hub / github.com/apify/impit / impit

Function impit

impit-python/src/lib.rs:18–169  ·  view source on GitHub ↗
(_py: Python, m: &Bound<'_, PyModule>)

Source from the content-addressed store, hash-verified

16
17#[pymodule]
18fn impit(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
19 m.add_class::<Client>()?;
20 m.add_class::<AsyncClient>()?;
21 m.add_class::<response::ImpitPyResponse>()?;
22
23 m.add("HTTPError", m.py().get_type::<errors::HTTPError>())?;
24 m.add("RequestError", m.py().get_type::<errors::RequestError>())?;
25 m.add(
26 "TransportError",
27 m.py().get_type::<errors::TransportError>(),
28 )?;
29 m.add(
30 "TimeoutException",
31 m.py().get_type::<errors::TimeoutException>(),
32 )?;
33 m.add(
34 "ConnectTimeout",
35 m.py().get_type::<errors::ConnectTimeout>(),
36 )?;
37 m.add("ReadTimeout", m.py().get_type::<errors::ReadTimeout>())?;
38 m.add("WriteTimeout", m.py().get_type::<errors::WriteTimeout>())?;
39 m.add("PoolTimeout", m.py().get_type::<errors::PoolTimeout>())?;
40 m.add("NetworkError", m.py().get_type::<errors::NetworkError>())?;
41 m.add("ConnectError", m.py().get_type::<errors::ConnectError>())?;
42 m.add("ReadError", m.py().get_type::<errors::ReadError>())?;
43 m.add("WriteError", m.py().get_type::<errors::WriteError>())?;
44 m.add("CloseError", m.py().get_type::<errors::CloseError>())?;
45 m.add("ProtocolError", m.py().get_type::<errors::ProtocolError>())?;
46 m.add(
47 "LocalProtocolError",
48 m.py().get_type::<errors::LocalProtocolError>(),
49 )?;
50 m.add(
51 "RemoteProtocolError",
52 m.py().get_type::<errors::RemoteProtocolError>(),
53 )?;
54 m.add("ProxyError", m.py().get_type::<errors::ProxyError>())?;
55 m.add(
56 "UnsupportedProtocol",
57 m.py().get_type::<errors::UnsupportedProtocol>(),
58 )?;
59 m.add("DecodingError", m.py().get_type::<errors::DecodingError>())?;
60 m.add(
61 "TooManyRedirects",
62 m.py().get_type::<errors::TooManyRedirects>(),
63 )?;
64 m.add(
65 "HTTPStatusError",
66 m.py().get_type::<errors::HTTPStatusError>(),
67 )?;
68 m.add("InvalidURL", m.py().get_type::<errors::InvalidURL>())?;
69 m.add(
70 "CookieConflict",
71 m.py().get_type::<errors::CookieConflict>(),
72 )?;
73 m.add("StreamError", m.py().get_type::<errors::StreamError>())?;
74 m.add(
75 "StreamConsumed",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…