multyproccess 2.32.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
request/__init__.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
request - HTTP library for Python
|
|
3
|
+
Simple and elegant HTTP client
|
|
4
|
+
|
|
5
|
+
This package provides a simple interface for making HTTP requests.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = '2.32.3'
|
|
9
|
+
__author__ = 'Python Software Foundation'
|
|
10
|
+
__license__ = 'Apache 2.0'
|
|
11
|
+
|
|
12
|
+
# Try to import from requests if available for compatibility
|
|
13
|
+
try:
|
|
14
|
+
from requests import (
|
|
15
|
+
get, post, put, delete, head, options, patch,
|
|
16
|
+
Request, Response, Session,
|
|
17
|
+
RequestException, ConnectionError, HTTPError,
|
|
18
|
+
Timeout, TooManyRedirects, URLRequired,
|
|
19
|
+
)
|
|
20
|
+
from requests import __version__ as _requests_version
|
|
21
|
+
except ImportError:
|
|
22
|
+
# Fallback stubs if requests not available
|
|
23
|
+
def get(*args, **kwargs):
|
|
24
|
+
raise NotImplementedError("requests library not installed")
|
|
25
|
+
|
|
26
|
+
def post(*args, **kwargs):
|
|
27
|
+
raise NotImplementedError("requests library not installed")
|
|
28
|
+
|
|
29
|
+
def put(*args, **kwargs):
|
|
30
|
+
raise NotImplementedError("requests library not installed")
|
|
31
|
+
|
|
32
|
+
def delete(*args, **kwargs):
|
|
33
|
+
raise NotImplementedError("requests library not installed")
|
|
34
|
+
|
|
35
|
+
def head(*args, **kwargs):
|
|
36
|
+
raise NotImplementedError("requests library not installed")
|
|
37
|
+
|
|
38
|
+
def options(*args, **kwargs):
|
|
39
|
+
raise NotImplementedError("requests library not installed")
|
|
40
|
+
|
|
41
|
+
def patch(*args, **kwargs):
|
|
42
|
+
raise NotImplementedError("requests library not installed")
|
|
43
|
+
|
|
44
|
+
class Request:
|
|
45
|
+
pass
|
|
46
|
+
|
|
47
|
+
class Response:
|
|
48
|
+
pass
|
|
49
|
+
|
|
50
|
+
class Session:
|
|
51
|
+
pass
|
|
52
|
+
|
|
53
|
+
class RequestException(Exception):
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
class ConnectionError(RequestException):
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
class HTTPError(RequestException):
|
|
60
|
+
pass
|
|
61
|
+
|
|
62
|
+
class Timeout(RequestException):
|
|
63
|
+
pass
|
|
64
|
+
|
|
65
|
+
class TooManyRedirects(RequestException):
|
|
66
|
+
pass
|
|
67
|
+
|
|
68
|
+
class URLRequired(RequestException):
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
__all__ = [
|
|
72
|
+
'get', 'post', 'put', 'delete', 'head', 'options', 'patch',
|
|
73
|
+
'Request', 'Response', 'Session',
|
|
74
|
+
'RequestException', 'ConnectionError', 'HTTPError',
|
|
75
|
+
'Timeout', 'TooManyRedirects', 'URLRequired',
|
|
76
|
+
]
|