garf-core 0.1.2__py3-none-any.whl → 0.1.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.
garf_core/__init__.py CHANGED
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = '0.1.2'
15
+ __version__ = '0.1.3'
garf_core/parsers.py CHANGED
@@ -83,6 +83,8 @@ class DictParser(BaseParser):
83
83
 
84
84
  def get_nested_field(self, dictionary: dict[str, Any], key: str):
85
85
  """Returns nested fields from a dictionary."""
86
+ if result := dictionary.get(key):
87
+ return result
86
88
  key = key.split('.')
87
89
  try:
88
90
  return functools.reduce(operator.getitem, key, dictionary)
@@ -102,6 +104,9 @@ class NumericConverterDictParser(DictParser):
102
104
  return type_(value)
103
105
  return value
104
106
 
107
+ if result := dictionary.get(key):
108
+ return convert_field(result)
109
+
105
110
  key = key.split('.')
106
111
  try:
107
112
  field = functools.reduce(operator.getitem, key, dictionary)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: garf-core
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Abstracts fetching data from API based on provided SQL-like query.
5
5
  Author-email: "Google Inc. (gTech gPS CSE team)" <no-reply@google.com>, Andrei Markin <andrey.markin.ppc@gmail.com>
6
6
  License: Apache 2.0
@@ -1,16 +1,16 @@
1
- garf_core/__init__.py,sha256=GIvTQD8k9INUEIQO5HBfLShtzbins5jjqQfi0z2J9h0,598
1
+ garf_core/__init__.py,sha256=-Lj9sBJvEhbNRTOXhSL0pxVhx6SscS0NzOsrJ-Q2Sp8,598
2
2
  garf_core/api_clients.py,sha256=k4vjFsA3JOx7Hp_pXIQNwzMXqq4u4dDcz-ddkJC0JhI,4651
3
3
  garf_core/base_query.py,sha256=ZDAw2ojmismXRO0HXEvKDukpS7OAc7390LnM8kvCSCY,1201
4
4
  garf_core/exceptions.py,sha256=Gzvkl2M-rA_XQRAMd3CC62KHeFQE_b6uby0fD0pouw4,1269
5
- garf_core/parsers.py,sha256=-178UL2hbrC83GkMqAPgrmpGpJitR7T9xT3OgJ8w16Y,3189
5
+ garf_core/parsers.py,sha256=PmF8Ez0s1k2duSbO-0MZClslILxzbZyGMbTlhFjOtVE,3321
6
6
  garf_core/query_editor.py,sha256=lA1aMFc_1wo6e2CyVISarnZxtH2jnKkuZfJecQqslDg,17191
7
7
  garf_core/report.py,sha256=O0SPxgVQckxi_QuD3vy1h_1mi5aMjQNw0LYP-jgN2Do,20262
8
8
  garf_core/report_fetcher.py,sha256=dgErrkRv1bdPN0npX3atZbJrOpzy9OmoPC38e2FpBSQ,4883
9
9
  garf_core/fetchers/__init__.py,sha256=_cSjg1D5RhUKxaVeVbaDdb8AAoI9glKJXgN5H4qXFkw,783
10
10
  garf_core/fetchers/fake.py,sha256=fgJjxuHyd6EIUflUtj8r_HfaMS1YTDrOqDlaj6Kvbjs,2584
11
11
  garf_core/fetchers/rest.py,sha256=-5B2-Ck_t3hG99ym59AKwlzctiDxRFI2Nnc8STBxRDo,2201
12
- garf_core-0.1.2.dist-info/METADATA,sha256=dGX17SeAetNBUlagvqWDGHX4yzIura36Bl1CP0Bd0OU,2443
13
- garf_core-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- garf_core-0.1.2.dist-info/entry_points.txt,sha256=u4h-ujHO1hbxVXRQzwcC4ftju9_KBYtq5mCLKEBHMj0,69
15
- garf_core-0.1.2.dist-info/top_level.txt,sha256=Gj-Zp7fM2turGut5vTJuo5xEcKfow7cTLX3y3WFfNgA,10
16
- garf_core-0.1.2.dist-info/RECORD,,
12
+ garf_core-0.1.3.dist-info/METADATA,sha256=clJ8P61aZo07V5ETjFnrD_b8VYoVV_iOvt9T6Qd9_Qc,2443
13
+ garf_core-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ garf_core-0.1.3.dist-info/entry_points.txt,sha256=u4h-ujHO1hbxVXRQzwcC4ftju9_KBYtq5mCLKEBHMj0,69
15
+ garf_core-0.1.3.dist-info/top_level.txt,sha256=Gj-Zp7fM2turGut5vTJuo5xEcKfow7cTLX3y3WFfNgA,10
16
+ garf_core-0.1.3.dist-info/RECORD,,