afgutils 1.3.0__tar.gz → 1.3.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: afgutils
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: Shared support functions
5
5
  Author: Araz Heydarov
6
6
  Author-email: araz.heydarov@asiafinancegroup.com
@@ -17,7 +17,12 @@ class FieldStorage:
17
17
 
18
18
  def __init__(self):
19
19
  self._fields: dict[str, FieldStorage.Field] = {}
20
+ request_method: str = os.getenv("REQUEST_METHOD")
20
21
  self.body_data: str = sys.stdin.read()
22
+ # if request_method == "POST":
23
+ # self.body_data: str = sys.stdin.read()
24
+ # else:
25
+ # self.body_data=""
21
26
  self._query_string_parsed: dict[str, FieldStorage.Field] = {}
22
27
  self._body_data_parsed: dict[str, Any] = {}
23
28
  self._populate_fields()
@@ -46,6 +51,9 @@ class FieldStorage:
46
51
  elif content_type == "application/json":
47
52
  self._body_data_parsed: dict[str, Any] = json.loads(self.body_data)
48
53
  self._fields.update({key: self.Field(value=value) for key, value in self._body_data_parsed.items()})
54
+ if type(x_cgi_headers:=self._body_data_parsed.get("X_CGI_HEADERS")) is dict:
55
+ for k, v in x_cgi_headers.items():
56
+ if not k.startswith("X_"): os.environ[k]=v
49
57
  elif content_type == "application/xml":
50
58
  self._body_data_parsed = xmltodict.parse(self.body_data)
51
59
  self._fields.update({key: self.Field(value=value) for key, value in self._body_data_parsed.items()})
@@ -304,7 +304,7 @@ class AfgFreezableMixin:
304
304
  self._freeze()
305
305
 
306
306
 
307
- class AfgFreezableObject(AfgFreezableMixin, AfgBaseObject):
307
+ class AfgFreezableObject(AfgFreezableMixin, AfgBaseMixin):
308
308
  """
309
309
  Extends AfgBaseObject with AfgFreezableMixin:
310
310
 
@@ -350,7 +350,7 @@ class AfgQueryResultMixin:
350
350
  super().__init__()
351
351
 
352
352
 
353
- class AfgQueryResult(AfgQueryResultMixin, AfgFreezableObject):
353
+ class AfgQueryResult(AfgQueryResultMixin, AfgFreezableMixin, AfgBaseMixin):
354
354
  """
355
355
  Extends AfgFreezableObject with AfgQueryResultMixin:
356
356
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: afgutils
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: Shared support functions
5
5
  Author: Araz Heydarov
6
6
  Author-email: araz.heydarov@asiafinancegroup.com
@@ -1,6 +1,6 @@
1
1
  from setuptools import find_packages, setup
2
2
 
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.2"
4
4
  DESCRIPTION = "Shared support functions"
5
5
  LONG_DESCRIPTION = "Shared support functions"
6
6
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes