edq-utils 0.0.8__py3-none-any.whl → 0.1.1__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.

Potentially problematic release.


This version of edq-utils might be problematic. Click here for more details.

edq/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
  General Python tools used by several EduLinq projects.
3
3
  """
4
4
 
5
- __version__ = '0.0.8'
5
+ __version__ = '0.1.1'
edq/util/net.py CHANGED
@@ -666,6 +666,7 @@ def make_request(method: str, url: str,
666
666
  params_to_skip: typing.Union[typing.List[str], None] = None,
667
667
  http_exchange_extension: str = DEFAULT_HTTP_EXCHANGE_EXTENSION,
668
668
  add_http_prefix: bool = True,
669
+ additional_requests_options: typing.Union[typing.Dict[str, typing.Any], None] = None,
669
670
  **kwargs: typing.Any) -> typing.Tuple[requests.Response, str]:
670
671
  """
671
672
  Make an HTTP request and return the response object and text body.
@@ -686,6 +687,9 @@ def make_request(method: str, url: str,
686
687
  if (files is None):
687
688
  files = []
688
689
 
690
+ if (additional_requests_options is None):
691
+ additional_requests_options = {}
692
+
689
693
  # Add in the anchor as a header (since it is not traditionally sent in an HTTP request).
690
694
  if (send_anchor_header):
691
695
  headers = headers.copy()
@@ -693,11 +697,12 @@ def make_request(method: str, url: str,
693
697
  parts = urllib.parse.urlparse(url)
694
698
  headers[ANCHOR_HEADER_KEY] = parts.fragment.lstrip('#')
695
699
 
696
- options = {
700
+ options = additional_requests_options.copy()
701
+ options.update({
697
702
  'headers': headers,
698
703
  'files': files,
699
704
  'timeout': timeout_secs,
700
- }
705
+ })
701
706
 
702
707
  if (method == 'GET'):
703
708
  options['params'] = data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edq-utils
3
- Version: 0.0.8
3
+ Version: 0.1.1
4
4
  Summary: Common utilities used by EduLinq Python projects.
5
5
  Author-email: Eriq Augustine <eriq@edulinq.org>
6
6
  License: MIT License
@@ -35,6 +35,7 @@ Requires-Python: >=3.8
35
35
  Description-Content-Type: text/markdown
36
36
  License-File: LICENSE
37
37
  Requires-Dist: json5>=0.9.14
38
+ Requires-Dist: platformdirs
38
39
  Requires-Dist: requests
39
40
  Requires-Dist: requests-toolbelt
40
41
  Provides-Extra: dev
@@ -49,6 +50,12 @@ Dynamic: license-file
49
50
 
50
51
  Common utilities used by EduLinq Python projects.
51
52
 
53
+ Links:
54
+ - [API Reference](https://edulinq.github.io/python-utils)
55
+ - [Installation / Requirements](#installation--requirements)
56
+ - [Configuration System](#configuration-system)
57
+ - [Configuration Sources](#configuration-sources)
58
+
52
59
  ## Installation / Requirements
53
60
 
54
61
  This project requires [Python](https://www.python.org/) >= 3.8.
@@ -1,4 +1,4 @@
1
- edq/__init__.py,sha256=XY5-38sK90I0I8dpOHQrMyfLBdgkzbHN6ayDPfRYjg0,86
1
+ edq/__init__.py,sha256=-CVBH7VCV7PXBZTWcJhNoXG1tmu5a5sUUNWZXtZGlbg,86
2
2
  edq/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  edq/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  edq/cli/version.py,sha256=SxarRVD_AVA-nD4pLVMe6ZjSJpMr7h_r3DgYYs42vjE,591
@@ -65,14 +65,14 @@ edq/util/dirent.py,sha256=gvU7I8TPFIjURAOPalfaOf3GSlAA0mXET_bHKC6_e_A,10369
65
65
  edq/util/dirent_test.py,sha256=WUx6Ux-13L9YIg2rDyOROv5Kbvgr4xy693ceG1osAP0,33855
66
66
  edq/util/json.py,sha256=nl_cxrlP97RX1BFtys8IT_3IfO0-XvBDQBe6YdrblB4,5936
67
67
  edq/util/json_test.py,sha256=utUVRbw3z42ke4fpRVI294RrFHcMKms8khVYRkISNk4,8009
68
- edq/util/net.py,sha256=2RT9UlO9nZ9jx1UfwKhSAG_sb7WgT6trn6MQm-BIKNo,32864
68
+ edq/util/net.py,sha256=KJZph2rj7YzALT46xIx6QBu_7nSyimJsRA2ZvxpM134,33101
69
69
  edq/util/pyimport.py,sha256=26OIuCXELyqtwlooMqDEs4GJQrkrAgxnXNYTlqqtsBY,2852
70
70
  edq/util/pyimport_test.py,sha256=Xno0MIa3yMTfBfoTgjKCIMpr1ZShU6bvo9rBRdecXQU,4202
71
71
  edq/util/reflection.py,sha256=jPcW6h0fwSDYh04O5rUxlgoF7HK6fVQ2mq7DD9qPrEg,972
72
72
  edq/util/time.py,sha256=anoNM_KniARLombv2BnsoHuCzDqMKiDdIzV7RUe2ZOk,2648
73
73
  edq/util/time_test.py,sha256=iQZwzVTVQQ4TdXrLb9MUMCYlKrIe8qyF-hiC9YLTaMo,4610
74
- edq_utils-0.0.8.dist-info/licenses/LICENSE,sha256=MS4iYEl4rOxMoprZuc86iYVoyk4YgaVoMt7WmGvVF8w,1064
75
- edq_utils-0.0.8.dist-info/METADATA,sha256=wUby76yDmAym7WEpyYm0wHe0G-JaKsz20A4mpEYeJ30,7276
76
- edq_utils-0.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
77
- edq_utils-0.0.8.dist-info/top_level.txt,sha256=znBHSj6tgXtcMKrUVtovLli5fIEJCb7d-BMxTLRK4zk,4
78
- edq_utils-0.0.8.dist-info/RECORD,,
74
+ edq_utils-0.1.1.dist-info/licenses/LICENSE,sha256=MS4iYEl4rOxMoprZuc86iYVoyk4YgaVoMt7WmGvVF8w,1064
75
+ edq_utils-0.1.1.dist-info/METADATA,sha256=jffvIETCgjGJZTf-5VmvuCCfFdaqk1w8fVObY29E0wA,7535
76
+ edq_utils-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
77
+ edq_utils-0.1.1.dist-info/top_level.txt,sha256=znBHSj6tgXtcMKrUVtovLli5fIEJCb7d-BMxTLRK4zk,4
78
+ edq_utils-0.1.1.dist-info/RECORD,,