annotate stubs/cyclone/httpclient.pyi @ 2078:2c48e92ad5d3

make loadtest real enough to cause numbers to change on collector's web view
author drewp@bigasterisk.com
date Tue, 24 May 2022 01:21:32 -0700
parents 0f0ff27e55a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1863
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
1 # Stubs for cyclone.httpclient (Python 3)
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
2 #
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
3 # NOTE: This dynamically typed stub was automatically generated by stubgen.
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
4
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
5 from twisted.internet.protocol import Protocol
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
6 from twisted.internet.defer import Deferred
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
7 from typing import Any, Callable, Dict, List, Optional
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
8
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
9 ListType = list
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
10 DictType = dict
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
11 agent: Any
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
12 proxy_agent: Any
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
13
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
14 class StringProducer:
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
15 body: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
16 length: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
17 def __init__(self, body: Any) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
18 def startProducing(self, consumer: Any): ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
19 def pauseProducing(self) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
20 def stopProducing(self) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
21
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
22 class Receiver(Protocol):
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
23 finished: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
24 data: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
25 def __init__(self, finished: Any) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
26 def dataReceived(self, bytes: Any) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
27 def connectionLost(self, reason: Any) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
28
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
29 class HTTPClient:
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
30 url: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
31 followRedirect: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
32 maxRedirects: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
33 headers: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
34 body: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
35 proxyConfig: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
36 timeout: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
37 agent: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
38 method: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
39 response: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
40 body_producer: Any = ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
41 def __init__(self, url: Any, *args: Any, **kwargs: Any) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
42 def fetch(self) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
43
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
44 class FetchResponse:
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
45 code: int
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
46 phrase: bytes
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
47 headers: Dict[bytes, List[bytes]]
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
48 length: int
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
49 body: bytes
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
50
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
51 def fetch(
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
52 url: bytes,
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
53 method: bytes=b'GET',
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
54 followRedirect: bool = False,
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
55 maxRedirects: int = 3,
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
56 postdata: Optional[bytes]=None,
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
57 headers: Optional[Dict[bytes, List[bytes]]]=None) -> Deferred[FetchResponse]: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
58
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
59 class JsonRPC:
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
60 def __init__(self, url: Any, *args: Any, **kwargs: Any) -> None: ...
0f0ff27e55a3 stubs, mostly autogen or empty
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
61 def __getattr__(self, attr: Any): ...